On Mon, Jul 27, 2009 at 10:26 AM, WebPat<webpa...@gmail.com> wrote:
> Bastien Koert wrote:
>> On Mon, Jul 27, 2009 at 8:31 AM, WebPat<webpa...@gmail.com> 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?
>> 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.

A lot of sites are moving to simulated dialog windows inside the page.
They have a few nice benefits:

1) Since they aren't real windows, they do not interfere with other
tabs or windows you have open in your browser.

2) Since they are actually part of the page itself, they will always
either stay on top of the other page elements or else they will
automatically close (whichever effect is desired).

3) They are not actual pop-up windows, so they won't be blocked by
pop-up blockers.

Granted, they depend on JavaScript, but then so did your other approach.



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

Reply via email to