WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Poping up a window next to the cursor, Guillermo, March 4, 2004
     Re:Poping up a window next to the cursor, Erik Arvidsson, March 5, 2004
         Re:Poping up a window next to the cursor, Guillermo, March 6, 2004
     Re:Poping up a window next to the cursor, Guillermo, March 5, 2004

Subject: Re:Poping up a window next to the cursor From: Guillermo Date: March 6, 2004

Great, man. Thanks a lot.

From: Erik Arvidsson
Sent: March 5, 2004
Subject: Re:Poping up a window next to the cursor

Use event screenX and event screenY

<a href="foo.html" onclick="window.open( this.href, '', 'left=' + (event.screenX - 30) + ',top=' + (event.screenY - 40) + ',width=200,height=200' ); return false;">Foo</a>

And by the way, don't use javascript: uris.

erik

I want to pop up a browser window but be able to set the position of it, say, 30 pixels left and 40 pixels above the mouse cursor. I'd like to be able to set these preferences within the link, such as:
javascript: window.open('mypage.html', '200', '200','30', '40')
Does anyone here have something like this already scripted?
Thanks!





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX