Hi fellas. I have a problem. I am trying ot get a popup window to appear
in the center of the screen, both vertically and horozontally. I am trying
to display a large version of an image in this window... but the image size
varies. I now have to know the size of the image before I can center it
properly. So, this is the code I am using.
fnFullView = function () {
var _mediumLargeIma ge = new Image();
_mediumLargeIma ge.src = arPhotolog[currIndex].full
var screenX = screen.width
var screenY = screen.height
var source = arPhotolog[currIndex].full
var h = _mediumLargeIma ge.height - 10
var w = _mediumLargeIma ge.width
var myOtherWindow =
open("","fullvi ew","toolbar=0, location=0,dire ctories=0,statu s=1,menubar=0,s c
rollbars=0,resi zable=0,width=" + w+ ",height="+ h);
cWidth = w
cHeight = h
abs_x = (screenX-cWidth)/2
abs_y =(screenY-cHeight)/2
myOtherWindow.d ocument.write(' <HTML><HEAD><TI TLE>www. Q Z M I C R O
..com</TITLE></HEAD><BODY ONBLUR="self.cl ose();" TOPMARGIN="0"
MARGINHEIGHT="0 " LEFTMARGIN="0" MARGINWIDTH="0" ><IMG ID="popUpImage " SRC='+
source+ ' BORDER="0" HEIGHT='+ h+ ' WIDTH='+ w+ '></BODY></HTML>');
myOtherWindow.d ocument.close() ;
myOtherWindow.m oveTo(abs_x,abs _y);
}
Now... My question is.... is this the standard for setting the image height
and width of an image to a variable? Why won't this script work on Netscape
7 or Opera 7? Mozilla 1.5 won't work either. Thanks guys. Let me know if
I need to explain my problem in further detail...
Tony Vasquez (Qzmicro)
in the center of the screen, both vertically and horozontally. I am trying
to display a large version of an image in this window... but the image size
varies. I now have to know the size of the image before I can center it
properly. So, this is the code I am using.
fnFullView = function () {
var _mediumLargeIma ge = new Image();
_mediumLargeIma ge.src = arPhotolog[currIndex].full
var screenX = screen.width
var screenY = screen.height
var source = arPhotolog[currIndex].full
var h = _mediumLargeIma ge.height - 10
var w = _mediumLargeIma ge.width
var myOtherWindow =
open("","fullvi ew","toolbar=0, location=0,dire ctories=0,statu s=1,menubar=0,s c
rollbars=0,resi zable=0,width=" + w+ ",height="+ h);
cWidth = w
cHeight = h
abs_x = (screenX-cWidth)/2
abs_y =(screenY-cHeight)/2
myOtherWindow.d ocument.write(' <HTML><HEAD><TI TLE>www. Q Z M I C R O
..com</TITLE></HEAD><BODY ONBLUR="self.cl ose();" TOPMARGIN="0"
MARGINHEIGHT="0 " LEFTMARGIN="0" MARGINWIDTH="0" ><IMG ID="popUpImage " SRC='+
source+ ' BORDER="0" HEIGHT='+ h+ ' WIDTH='+ w+ '></BODY></HTML>');
myOtherWindow.d ocument.close() ;
myOtherWindow.m oveTo(abs_x,abs _y);
}
Now... My question is.... is this the standard for setting the image height
and width of an image to a variable? Why won't this script work on Netscape
7 or Opera 7? Mozilla 1.5 won't work either. Thanks guys. Let me know if
I need to explain my problem in further detail...
Tony Vasquez (Qzmicro)
Comment