469,568 Members | 1,395 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,568 developers. It's quick & easy.

Javascript to Push IE Window to front

We've got a CDROM with a Flash Projector movie on it. Within the
Flash projector (which is already burned on CDROM...can't change it),
we have the typical getURL fuctions to open a Web browser and browse a
link. This works fine when there isn't a browser window already open:
the link opens in the FOREGROUND, infront of our Flash Projector.

However, now we've got a problem since after we've burned the CDROM,
if a user has a Web browser open already, and clicks a link within the
Projector, the new window does not come to the front...it simply stays
behind the full-screen projector.

So, we've tried putting an onLoad="window.focus;" tag in our BODY tag
on the web pages our Project is linking to, and that actually worked
at first (the pages are ASP Classic). However, they're not working
anymore. We're really not sure why.

When we load that page, quickly flip to another via ALT-TAB, the first
page DOES come forward. However, it doesn't seem to come infront of
another application. So, if we hit reload for the above page, then
quiclkly ALT-TAB to MS Word, the page will not force itself infront of
Word.

Any suggestions?
Jul 23 '05 #1
1 6339
Ozzy wrote:
We've got a CDROM with a Flash Projector movie on it. Within the
Flash projector (which is already burned on CDROM...can't change it),
we have the typical getURL fuctions to open a Web browser and browse a
link. This works fine when there isn't a browser window already open:
the link opens in the FOREGROUND, infront of our Flash Projector.

However, now we've got a problem since after we've burned the CDROM,
if a user has a Web browser open already, and clicks a link within the
Projector, the new window does not come to the front...it simply stays
behind the full-screen projector.

So, we've tried putting an onLoad="window.focus;" tag in our BODY tag
You have tried putting an _attribute with a value_ in the _start tag_ of
the BODY _element_.
on the web pages our Project is linking to, and that actually worked
at first (the pages are ASP Classic). However, they're not working
anymore. We're really not sure why.


`window.focus' is not a method call, `window.focus()' is. Furthermore,
window.focus() is a host object's method. To avoid script errors, you
should test if that method is defined before you call it:

onload="if (window.focus) window.focus();"

See <http://pointedears.de/scripts/test/whatami>.
HTH

PointedEars
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by D Newsham | last post: by
10 posts views Thread by the DtTvB | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.