Email conversation
From | Martin Ulis |
To | Me |
Subject | perfect pop-ups |
Date | 2 May 2006 20:35 |
Hi,
perfect popups script is what i wanted for ages and i like your script. But
i wonder, is there any solution for doing one thing.. Now when i press a
thumbnail, the very small window appears in the top left corner of my screen
and only when picture loads, it centers the screen. Is the any possibility
that the window, which appears firstly, can be also centered, not in the top
left corner? ill be really thankful if you could tell me solution, etc..
Sorry if there are some errors, my english is not fluent, but im hoping you
had understood what i was asking.
will be hoping to get the solution,
thanks,
Martin
From | Me |
To | Martin Ulis |
Subject | Re: perfect pop-ups |
Date | 2 May 2006 21:29 |
Martin,
> Is the any possibility
> that the window, which appears firstly, can be also centered
Sure. Fairly easily. However, since I do not run the centering in Opera (see
the Perfect Popups article for more details), I will also exclude Opera from
centering the popup when it is first opened. At the top of the script, there
is a block like this:
PositionX = 10;
PositionY = 10;
defaultWidth = 600;
defaultHeight = 400;
change it to this:
defaultWidth = 600;
defaultHeight = 400;
PositionX = window.opera ? 10 : ((screen.availWidth-defaultWidth)/2);
PositionY = window.opera ? 10 : ((screen.availHeight-defaultHeight)/2);
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
From | Martin Ulis |
To | Me |
Subject | Re: perfect pop-ups |
Date | 3 May 2006 07:43 |
Thank you a lot, it works fine :)