Urgent - popup position reletive to centre

R

Robster

I'd to postion a pop up windown to appear in a position relevtive to
the centre of the screen, rather than top=200, left=200.

Is there any way i can do this?

Alternatively i need a script that will position the popup in the same
place irellevent of browser window and resolution....

Any ideas?

Thanks
 
L

Lasse Reichstein Nielsen

I'd to postion a pop up windown to appear in a position relevtive to
the centre of the screen, rather than top=200, left=200.

Is there any way i can do this?

You didn't say what it is for, so I assume it's for the internet.

The answer is: Maybe, but there are some cases where it is bound to
fail, so I recommend they you let the browser place the window.

<URL:http://www.infimum.dk/HTML/JSwindows.html#ref_3_3>

If you decide to to it anyway, you can find the screen resolution
as
screen.availHeight
and
screen.availWidth

If you know the size of your popup, you can then find the top and left
position that corresponds to centering it, if possible.
Alternatively i need a script that will position the popup in the same
place irellevent of browser window and resolution....

The only location that is independent of resolution is 0,0. With an MDI
browser, you can't place anything independently of the browser window.

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top