Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

short question : coordinates of a popup window

Status
Not open for further replies.

JeroenB

Programmer
Apr 8, 2001
93
BE
Hi,

How can I get the coordinates of a popup window ?

Thanks
jeroenB
 
Do you want the co-ordinates so you can arrange where you want your popup to appear??

Need more info please. [deejay]
Nate
"If you're not living on the edge, you're taking up too much space!"
 
Hi,

I have a popup window; the problem is that you can drag this popup to a different place in your browser; so I want to know the x and y coordinates of the current position of the popup window in the browser....

I hope this makes things more clear ?!?

JeroenB
 
<SCRIPT LANGUAGE=&quot;Javascript&quot;>
window.open(&quot;file.html&quot;,&quot;Popup&quot;,&quot;toolbar=no,location=no,directories=no,status=no,&quot; + &quot;menubar=no,scrollbars=no,resizable=no,&quot; + &quot;width=715,height=115,screenX=149,screenY=311&quot;)
// End-->
</SCRIPT>

This is the coding needed for a popup window, you can change the size, add toolbars, etc and choose the position to where you want the popup to appear (x, and y co-ords)

Hope this helps [deejay]
Nate
&quot;If you're not living on the edge, you're taking up too much space!&quot;
 
Yeh right,

that was not my question.
I know to make a popup;
I just need the code to get the coordinates of a popup after dragging it ....


Thanx anyway
j
 
here's my suggestion:

create a couple hidden form fields, say &quot;XwinPos&quot; and &quot;YwinPos&quot;.

write a function that onDrag changes the values of those fields to the new coords...

-mjg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top