Re: Window Location(s)
- From: "S. Justin Gengo" <justin[remove-to-mail]@about-delete-to-mail-fortunate.com>
- Date: Wed, 17 Dec 2008 14:06:11 -0600
Homer,
This may work for you - I found it in a post on another site:
You can't specify the monitor, but you can specify the position of the popup window as being relative to the where the click caused the window to popup.
Use the getMouseXY() function to get values to pass as the left and top args to the window.open() method. (the left and top args only work with V3 and up browsers).
window.open docs: http://www.javascripter.net/faq/openinga.htm
function getMouseXY( e ) { if ( event.clientX ) { // Grab the x-y pos.s if browser is IE. CurrentLeft = event.clientX + document.body.scrollLeft; CurrentTop = event.clientY + document.body.scrollTop; } else { // Grab the x-y pos.s if browser isn't IE. CurrentLeft = e.pageX; CurrentTop = e.pageY; } if ( CurrentLeft < 0 ) { CurrentLeft = 0; }; if ( CurrentTop < 0 ) { CurrentTop = 0; }; return true;}
--
Sincerely,
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Homer J." <KillingComputers@xxxxxxxxxxx> wrote in message news:4C8A34DE-88E8-4111-B429-32A28338FDF2@xxxxxxxxxxxxxxxx
I have a web page that has a popup that is opened via window.open. No
problems here. The web app that I'm writing will be used by folks that run
dual monitors. How can I have that popup open on the same monitor that the
parent is on?
--
Homer J.
.
- Follow-Ups:
- Re: Window Location(s)
- From: Homer J.
- Re: Window Location(s)
- From: Homer J.
- Re: Window Location(s)
- References:
- Window Location(s)
- From: Homer J.
- Window Location(s)
- Prev by Date: Getting client computers local time
- Next by Date: Re: Getting client computers local time
- Previous by thread: Window Location(s)
- Next by thread: Re: Window Location(s)
- Index(es):
Relevant Pages
|