How can I get the pop up form to appear in the middle of the screen? This web address refers. http://www.dynamicdrive.com/dynamici...photoalbum.htm
Thank you.
jjstccean![]()
How can I get the pop up form to appear in the middle of the screen? This web address refers. http://www.dynamicdrive.com/dynamici...photoalbum.htm
Thank you.
jjstccean![]()
Assuming you're using the default code that came with the script to pop up a window:
Centering it would be a matter of calling popwin.moveTo() and moving it to the appropriate coordinates on the screen. Something like:Code:var popwin=open(imgsrc.href, "popwin", popupsetting[1])
Where 500 and 600 are assumed to be the dimensions of your pop up window (width and height).Code:var winx=screen.availWidth/2-500/2 var winy=screen.availHeight/2-600/2 popwin.moveTo(winx, winy)
DD Admin
Thank you kindly DD. If I may, these numbers, what do they represent?
var winx=screen.availWidth/2-500/2
var winy=screen.availHeight/2-600/2
I've pasted this code as you've suggested - the pop up window does pop up in the center of the screen - though it is very small: +- 120px x 120px. Any suggestions please?
Am I doing anything wrong? Please excuse my ignorance as my knowledge of PHP is very limited.
Thank you.
Regards,
jjstccean.
Are you saying the pop up window is very small (120x120)? Its size is based on the settings you've defined inside the original code, specifically, this line:
Code://Toggle popup link setting: popupsetting[0 or 1, "pop up window attributes" (if 1)] var popupsetting=[1, "width=500px, height=400px, scrollbars, resizable"]
DD Admin
jjstccean (01-02-2009)
thank you DD.I played with the settings - still no luck, the popup window remain small - i played with popupsettings from 1 to 0 which maximize the window -
this line: var popupsetting=[1, "width=500px, height=400px, scrollbars, resizable"] has no effect after adding this:
var winx=screen.availWidth/2-500/2
var winy=screen.availHeight/2-600/2
popwin.moveTo(winx, winy)
please know that I'm referring to the this section:
//By default, each image hyperlinks to itself.
//However, if you wish them to link to larger versions of themselves
//Specify the directory in which the larger images are located
//The file names of these large images should mirror those of the original
//Enter a blank string ("") to disable this option
var targetlinkdir="http://www.microtiger-za.co.za/largefoto/"
Thank you very much for your trouble.
jjstccean
Did you try changing the values I highlighted in red above? If so and it still doesn't work, please post a link to the page on your site that contains the problematic script so we can check it out.
DD Admin
jjstccean (01-02-2009)
http://www.microtiger-za.co.za/fotoAlbum.html thank you DD. though, in the interim I've discovered where I'm going wrong. I've been checking my web site results using "chrome" - then a birdie tells me, check it out also with IE and Firefox! and lo and behold it's working! so sorry about all my terrible mix-up. And thank you again for your kind assistance. For the record, I'm I the only one having this problem in "Google Chrome"? Do you guys use/test chrome?
Regards,
jjstccean.
Last edited by jjstccean; 01-05-2009 at 06:45 AM. Reason: not finalised.
Bookmarks