Bring a browser window to the top

Posted on 2007-10-16
Last Modified: 2008-09-30
I am working with a windows app that launches my application in to a browser window. However, sometimes our app is not brought to the forefront and either sits behind other windows or just flashes in the windows status bar.

I am sure if the developer of the windows app can set it up to bring the browser to the front with some api calls, but I was wondering if this was possible to do from javascript.
Question by:JDEE8297
    LVL 3

    Accepted Solution

    Sure thing, just stick the following in the body tag of the new window.

    <body onLoad="window.focus()">

    //page content


    Expert Comment

    The solution was cool

    Author Comment

    worked like a charm when I used it as well. :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
    Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now