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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Position of popup window

Status
Not open for further replies.

programmher

Programmer
May 25, 2000
235
US
I have a form that is partitioned into several parts. I need my JS pop-up message windows to appear within each part - not in the middle of the form.

How do I do this? (I would use the keyword search but it's STILL DOWN!!!)

Thank you in advance!
 
Are they showmodalDialogs? Or actual windows, either way, they have top, and left attributes for positioning. Just add them into the attribute string...top=100 etc.

BB "Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer"
 
This will open a popup window at the location of a mouse click, hope this helps.

var a = event.screenX;
var b = event.screenY;
var max_width = screen.width - 600;
var max_height = screen.height - 150;
if(a >= max_width)
a = a - 600;
if(b >= max_height)
b = b - 150;

window.open('yourdoc.htm','ws','height=100,width=600,left='+a+',top='+b);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top