Re: How to pull window to the foreground - Window Focus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bastien Koert wrote:
On Mon, Jul 27, 2009 at 8:31 AM, WebPat<webpat52@xxxxxxxxx> wrote:
I have a web page with a button that displays additional information for the
user. It does a Window.Open to create a "popup" window, then populates it.

If the user goes back to the web page without closing the window, it often
goes behind the browser and is not visible (which is not the problem). But
if the user selects the button again, nothing appears to happen because the
window remains behind the browser, although it is updated.

The popup window has its own source file that populates it. I'd like to add
a Window.Focus at the end of the population process. That should move the
popup window to the foreground whenever it is refreshed. I can't get the
code to actually do that. How can I make that popup window have focus?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




in the body tag add an onfocus event

<body onload="window.focus();">


That was just what I need. Thanks.
However, I first tried it in Firefox and it did not work.
Eventually gave it a try in IE7 and it works just fine! Maybe something wrong with Firefox. I have Firebug available in Firefox. It reported "Prototype undefined" for this event. Not sure if that means in Firebug or Firefox.
Anyway, I'll leave it at that and be happy with your help. Thanks again.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux