Javascript to Push IE Window to front

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ozzy

    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?
  • Thomas 'PointedEars' Lahn

    #2
    Re: Javascript to Push IE Window to front

    Ozzy wrote:[color=blue]
    > 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[/color]

    You have tried putting an _attribute with a value_ in the _start tag_ of
    the BODY _element_.
    [color=blue]
    > 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.[/color]

    `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

    Comment

    Working...