A
Applebrownbetty
Hi,
I'd like to append/amend the following code from the Dreamweaver extension
"Open Picture Window Fever" for the ability to center the PopUp window:
By default, it allows the window to be offset on the left and top, but does
not include a centering option.
I'm thinking it would include something like (screen.width-imageWidth)/2;
somewhere but not sure how do go about doing this.
Thanks for any help!
______________
function
openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLe
ft,posTop) { // v4.01
newWindow =
window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scro
llbars=no,left="+posLeft+",top="+posTop);
newWindow.document.open();
newWindow.document.write('<html><title>'+alt+'</title><body
bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0"
marginwidth="0" onBlur="self.close()">');
if (imageType == "swf"){
newWindow.document.write('<object
classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c
ab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param
name=quality value=high>');
newWindow.document.write('<embed src=\"'+imageName+'\" quality=high
pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod
_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\"
width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
newWindow.document.write('</embed></object>'); }else{
newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+'
height='+imageHeight+' alt=\"'+alt+'\">'); }
newWindow.document.write('</body></html>');
newWindow.document.close();
newWindow.focus();
}
I'd like to append/amend the following code from the Dreamweaver extension
"Open Picture Window Fever" for the ability to center the PopUp window:
By default, it allows the window to be offset on the left and top, but does
not include a centering option.
I'm thinking it would include something like (screen.width-imageWidth)/2;
somewhere but not sure how do go about doing this.
Thanks for any help!
______________
function
openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLe
ft,posTop) { // v4.01
newWindow =
window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scro
llbars=no,left="+posLeft+",top="+posTop);
newWindow.document.open();
newWindow.document.write('<html><title>'+alt+'</title><body
bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0"
marginwidth="0" onBlur="self.close()">');
if (imageType == "swf"){
newWindow.document.write('<object
classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.c
ab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param
name=quality value=high>');
newWindow.document.write('<embed src=\"'+imageName+'\" quality=high
pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod
_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\"
width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
newWindow.document.write('</embed></object>'); }else{
newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+'
height='+imageHeight+' alt=\"'+alt+'\">'); }
newWindow.document.write('</body></html>');
newWindow.document.close();
newWindow.focus();
}