How to check if the browser window is open?

Background:
In my applet, I have 2 buttons: "Open" and "Close".
When "Open" is clicked, I open a URL using:
getAppletContext().showDocument(new java.net.URL("http://server/MyPage.html"), "MyWindow") This works fine.
When "Close" is clicked, I want to close the previously opened browser window. For that, I am using: getAppletContext().showDocument(new java.net.URL("http://server/Close.html"), "MyWindow") In Close.html, I have used JavaScript's self.close() on OnLoad event.
This also works fine, i.e., the previously opened browser window gets closed.
Now the problem:
If the previously opened browser windows is manually closed, then when "Close" button is clicked, a browser window flashes and goes off. To avoid this, I want to detect if the previously opened browser window is still open - before clicking on "Close" button. Is there a way to do this?
thanks and regards,
DAKAMATH

Note that I am using self.close() in onLoad event because I am closing the same window. If the window doesn't exist, it will create (from Java) and close it (from JavaScript). So it flashes. So it is required that I need to check for browser window existance from within Java and not in JavaScript.
thanks and regards,
DAKAMATH

Similar Messages

  • Cannot download application world- how to close all the browser windows

    i cannot download the blackberry application world "sorry, your session has expired. Please close all of your browser windows and then return to the welcome page to start again." How to close all the browser windows?

    Hello numadia
    Welcome to BlackBerry Support Forums
    Is your problem resolved or you're still having problem with download BlackBerry world !
    If you're having problem then just peform a Battery pull restart by removing the battery while your device is Powered On, wait for a min. then reinsert it back after reboot please try it again.
    If problem persists then you can also go through this Knowledge Base  KB32113
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • How can I keep the browser window stretched across my two displays?

    I run am trying to run dual monitor setup and have the Firefox browser span the two monitors. Whenever a Firefox dialog opens, such as Preferences or Print, the window zooms to fit the one primary monitor. How can I keep the browser window stretched across my two displays?

    Thanks very much for your response to my question -very helpful.
    Do you have any recommendations for a good book on Edge Animate?
    Thanks,
    Shaun
    Date: Thu, 25 Oct 2012 17:10:43 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I change the browser window background color when playing an Edge animation?
        Re: How can I change the browser window background color when playing an Edge animation?
        created by heathrowe in Edge Animate - View the full discussion
    ADD this to compositionReady handler, change the hex color code to your desired color //Force body of webpage to a specific color$("body").css("background-color","#5d5e61"); Darrell
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4801409#4801409
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4801409#4801409
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4801409#4801409. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Edge Animate by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How do I get the browser windows at the top to come back

    how do i get thge browser windows at the top to come back

    How to get all the iWork apps, iPhoto, and iMovie for free on an eligible iPhone or iPad
    http://www.imore.com/how-get-all-iwork-apps-iphoto-and-imovie-free-eligible-ipho ne-or-ipad
     Cheers, Tom

  • Want to play WOW-how do i make the browser windows fill whole screen??

    Have been a pc user all my life and just got a MacBook Pro. When i used to connect to the internet the browser window would fill the whole screen. This may seem like a stupid question but how do i make this happen on the mac? And to do the same for things like iMovie maker etc. My son says world of warcraft needs to be played on the whole screen and not just in a small box.
    Have tried adjusting the display etc but that makes things look distorted. Is there another way? Help!
    Thanks to anyone who helps!

    Press Cmd+M if you want to play it in full screen mode. If you want a bigger window for windowed mode just drag the little thngy at the bottom right of your WoW window and you will be able to resize it. Hope this helps

  • How to check whether the browser supports cookie using servlet

    Hi
    I have a servlet that uses session.I want to check whether the browser supports cookie.
    Please help me how can i detect this using servlet.
    could you please include a sample code
    thanks
    sabu

    You can check whether any cookies were sent in the request to your servlet:
    Cookie cookies[] = request.getCookies();
    if cookies is not null (cookies != null) then the browser sending you the request suppoerts cookies.
    If it is null then you would need to do a little extra work. Basically add a cookie to the response going back to the browser. Then send a redirect back to this same servlet. You then would have to add code to check to see whether the cookie was sent back.
    // Servlet named myServlet
    String test = request.getParameter("TEST");
    Cookie cookies[] = request.getCookies();
    if (test == null || !test.equals("TRUE")
    if (cookies == null)
    response.addCookie("testCookies","testCookies");
    response.sendRedirect("myServlet?TEST=TRUE");
    else
    // cookies were sent in the initial request, so
    // browser supports cookies
    else
    // This is the redirect. Check the for the presence of
    // our testCookie
    Hope this helps.

  • How can I set the finder window to open the same way every time?

    Everytime I open Finder it goes back to it's default view which is just too small, but I want to set the finder columns and window so that they open the same exact way every single time. I'm tired of resizing everything.
    Currently I have to resize every window and column everytime and I think my work is much slower then when I was on Windows because of it.
    Is there a setting, script, file, patch, anything, is there absolutely anything I can do to actually control the Finder views and make them adjust to MY criteria and stay that way...

    That is a big negative. That does absolutely nothing other then close my window, next time the finder window is opened then the column widths are small again.
    In Windows Explorer all your windows are customizable, how do I do this with Finder?

  • How do I lock the browser window

    When I attempt to highlight something within the browser the window moves with my cursor. I am on a mac and went through all my preferences ect on Firefox to fix this and was unable to resolve this issue.
    == This happened ==
    Every time Firefox opened

    Hello A.C..
    Although possibly not related to your problem, I will remind you that the version of Firefox you are using at the moment has been discontinued and is no longer supported. Furthermore, it has known bugs and security problems. I urge you to update to the latest version of Firefox, for maximum stability, performance, security and usability. You can get it for free, as always, at [http://www.getfirefox.com getfirefox.com].
    As for your issue, can you be a bit more specific? You may, in any case, be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
    If you want support for one of your add-ons, you'll need to contact its author.

  • Can't get full screen view- how do I expand the browser window to full screen

    A portion of the available screen is used to display open tabs. I want the browser to fill the whole view screen. Is there a way to do this? I am running Firefox on an android tablet.

    You should be able to "swipe" the tabs list away. Press with your finger near the line that separates the tab list from the webpage, and drag to the left.

  • How do I get the "playlist" window to open on the left side of the Itunes library

    When I first started using Itunes, the playlist window was located on the left side of the library window. Somehow it got moved to the right side and being a creature of habit, I'd like it back on the left side. I'd also like to know how to lock it so it won't move again. Thanks

    Cntrl + S will enable the sidebar.

  • Since I began to use Time Warner Cable internet connection, I find it difficult to get Firefox to open. Firefox.exe opens, but the browser window seldom opens. How can I fix this? I use Windows XP Home.

    A few times, I have gotten Firefox to open.

    Try changing firefox to the default browser: [http://kb.mozillazine.org/Setting_Your_Default_Browser]. That will probably get firefox to open when you dial up.
    I'm not sure what you mean by "the meter accelerating the web page". Can you explain that?
    Thank you

  • How to check if the spool req is open or close and close the req or open it

    Hi All.
    I have developed a program in which user can have option of print preview the outputs (all prints in one print request) , then save the outputs in one pdf, then send them through fax/email
    But problem is that when I run each option, the spool requests get generated properly. But when I do print preview and then save as pdf is gives error message that
    "No output request open. Document processing not possible. "
    Diagnosis
        You tried to process a new document by calling function module
        SSFCOMP_PROCESS_DOCUMENT, but no output request is open.
    System response
        The system issues an error message.
    Procedure
        Check the sequence in which you call the function modules SSFCOMP_OPEN
        and SSFCOMP_CLOSE. This is probably an internal error. Contact the SAP
        hotline and report the problem.
    in the code of print preview I have called the FM:
    call function 'SSFCOMP_CLOSE'
        exceptions
          ERROR  = 1
          others = 2.
      if SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Please help.
    Rgds,
    Madhuri

    Hi
    1) Use below parameters of structure SSFCTRLOP
    NO_OPEN, NO_CLOSE: These two flags prevent the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request. The value should be like the following:
    1st call: 
    NO_OPEN = SPACE.
    NO_CLOSE = 'X'.
    nth call:
    NO_OPEN = 'X'.
    NO_CLOSE = 'X'.
    last call:
    NO_OPEN = 'X'.
    NO_CLOSE = SPACE
    2.SSFCOMPOP: Structure for the output option.
    TDNEWID: A flag indicating whether a new request is created.
    4)     Define one data wa_print_control referencing the structure SSFCTRLOP, and define another data variable wa_output_option referencing the structure SSFCOMPOP in the top include file of this report.
    5)     Clear the above two work areas before the print loop happens on the internal table that contains the selected invoice headers.
    6)     Initialize these two work areas with the values which would not change during the print loop as the following code fragment:
    wa_print_control-no_dialog = ' '. u201DShow print setting dialog
                wa_print_control-preview = 'X'. u201DEnable print preview
                wa_output_option-TDNEWID = 'X'. u201CNew spool request.
    7)     In the loop at the internal table which holds the selected invoice headers, set blank value to of the field wa_print_control-NO_OPEN and set u2018Xu2019 to the field wa_print_control-NO_CLOSE for the first loop at the AT FIRST event because it will be the first call to the function module of the smartform. The code is bellow:
        print_control-no_open = ' '.
        print_control-no_close = 'X'.
    8)     Set blank value to the field wa_print_control-NO_CLOSE to close the spool request for the last loop at the AT LAST event.
    wa_print_control-NO_CLOSE = u2018 u2018
    9)     Call the function module generated by the Form Design by passing the print control work area and output area.

  • My Firefox window used to be about 3/4 of my screen width but after crashung and restarting is now full screen width. How do I get the Firefox window back to 3/4 screen width?

    I don't want my Firefox browser window to be the full screen width. How do I adjust the browser window width?
    Thank you.

    This can be a problem with the file [http://kb.mozillazine.org/localstore.rdf localstore.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder].
    Delete localstore.rdf or rename the file to localstore.rdf.sav in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] to test if the file is corrupted.<br />
    See http://kb.mozillazine.org/Corrupt_localstore.rdf<br />
    (caution: do not delete the localstore.rdf file in the Firefox program installation folder)

  • How can i get my movie to expand the browser window?

    hi everyone,
    thanks for checking out my post...
    i want to create a fullscreen site like www.danwheldon.com or
    www.highlandspring.com where the movie expands to the whole of the
    browser window.
    ive made my movie 1024x768 and just copied the html source
    from the pages just to test it but my movie just appears as
    1024x768 in the top left of the screen and doesnt reach to the far
    corners.
    when that didnt work i checked out loads of tutorials and
    spent a whole day trying to figure out how to do it but to no
    avail.
    does anybody have a clue what im doing wrong?
    thank you very much and i hope to hear from you.
    all the best,
    mark

    Hi Mark,
    First thing: in the HTML tab of the publish settings, set the
    dimensions to percent and choose 100 for width and height.
    Depending on your content, you might then need to play around
    with the scaling of the objects on stage. There's some info in the
    online help about this:
    http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000150.html
    Cheers,
    Julian

  • How do i get my navbar to stay on one line when the browser window is minimized?

    I am new to coding and have just created my first website in html and css.  I know that the coding is pretty dire and that I have a lot to learn and hope that someone can guide me in how to solve this problem.  When the browser window is minimized, the navbar breaks down into 2 or 3 lines but I want the navbar to fit to the window whatever the size of the client machine.
    I think I need to add a media query but i'm not sure if i do and if so what code to use and where to put it?
    I am worried that the page will only be viewable properly on a desktop and i really want to learn how to make a fluid layout which can be viewed on 320px, 768px and 1200px.
    Any guidance would be greatly appreciated.
    Here is my code:
    HTML
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>The Engineer's Corset</title>
    <link href="styles/style.css" rel="stylesheet" type="text/css" media="screen">
    <style type="text/css">
    body {
        background-color: #000;
    </style>
    </head>
    <body>
    <div id="container">
    <div id="navbar">
        <ul id="nav">
        <li><span class="current-menu-item">Home</span></li>
        <li><a href="about.html">About Us</a></li>
        <li><a href="workshops.html">Workshops</a></li>
        <li><a href="news.html">News</a></li>
        <li><a href="gallery.html">Gallery</a></li>
        <li><a href="contact.html">Contact Us</a></li>
        </ul>
    </div>
    <div id="header">
      <img src="images/final/headerbeauty3.png" width="1100" height="341" alt="The Engineer's Corset">
    </div>
    <div id="links">
    <ul id="link">
    <li><a href="https://www.facebook.com/Bristolengineer" target="_blank"><img src="images/final/fb3.png" width="200" height="45" alt="Follow Us on Facebook"></li>
    <li><a href="https://twitter.com/Engineerscorset" target="_blank"><img src="images/final/twitter2.jpg" width="200" height="45" alt="Follow us on Twitter"></a></li>
    </ul>
    </div>
    <div class="chantry">
    <img src="images/final/CD Logo fin.png" width="240" height="200" alt="Chantry Dance Company">
    </div>
    <div class="about">
      <p> The Engineer's Corset is a new play written by Janet Goddard for performance by the community of Bristol in 2015. <br>  ~ <br>
    The play is based on the extraordinary real-life events of 1843 surrounding Isambard Kingdom Brunel's near-death experience after swallowing a coin.  We travel through time to explore the adventure and horror of Victorian industrialisation. <br> ~ <br> Using a community theatre group The Engineer’s Corset tells a familiar tale of Brunel’s near death experience when he swallows a gold half sovereign. His wife Mary fights to maintain her composure but is ripped apart by the waiting game. Her servants and his workforce, using dance and sound, broaden her horizons. Just like Mary the audience too will see life in the 1840s through a different lens.</p>
    </div>
    <div class="workshops">
    <img src="images/final/bridgebridge.jpg" width="1100" height="713" alt="clifton suspension bridge">
    <span><a href="workshops.html">We will be running a series of workshops prior to production and hope you will join us.  For further information, click here.</a></span>
    </div>
    <div id="sponsorspace"></div>
    <div id="footer"> <p> &copy; Heartprints Web Design 2014 </p> </div>
    </div>
    </body>
    </html>
    CSS
    @charset "utf-8";
    /* CSS Document */
    body {
        font-family:Arial, Helvetica, sans-serif;
        font-size:125%;
    @media screen {
        #navbar:
    #navbar li {
        font: 25px Arial;
        display: inline;
        list-style-type: none;
        background: #09F;
        color: #000;
        border-radius: 20px;
        padding: 15px 25px;
    .current-menu-item {
        color: #0FF;
    #navbar a {
        padding: 15px 25px;
        background-color: #6cf;
        color: #000;
        text-decoration: none;
        border-radius: 20px;
    #navbar a:hover {
        background-color:#0FF;
        color: #000;
        padding: 15px 25px;
    #header {
        width: 1100px;
        height: 340px;
        margin-left: 50px;
        margin-top: 0px;
        margin-bottom: 0px;
        border-style: ridge;
        border-width: 5px;
        border-color:#09F;
    #links li {
        display: inline;
        width: 700px;
        margin-left: 300px;
    .chantry {
        margin-left: 40px;
    .about {
        position: relative;
        width: 860px;
        text-align:center;
        background-color: #CCC;
        color: #000;
        border-style: ridge;
        border-width: 3px;
        border-color:#09F;
        border-radius: 15px;
        float: right;
        margin-top: -200px;
        margin-right: 90px;
    .workshops{
        position:relative;
        width: 1100px;
        height: 713px;
        font-size:24px;
        margin-left: 50px;
        border-style: ridge;
        border-width: 5px;
        border-color:#09F;
        margin-top: 130px;
    .workshops span {
        position: absolute;
        background: #6CF;
        color: #000;
        left: 30px;
        top: 30px;
        right: 800px;
        padding: 15px;
        font: 1em georgia, serif;
        font-style:italic;
        text-align:center;
        border: 5px solid #09F;
        border-radius: 20px;
        margin-top: 35px;
    .workshops span a {
        color: #000;
    #link li {
        border-style: solid;
        border-color: #6CF;
        padding: 30px 10px 5px 10px;
    .info {
        text-align:center;
        width: 1100px;
        margin-top: 50px;
        margin-bottom: 50px;
    .CDC {
        float: left;
        margin-right: 50px;
        margin-left: 45px;
    .workshopinfo {
        height: 250px;
        text-align:center;
        margin-top: 50px;
    .photos {
        Height: 500px;
        text-align:center;
        margin-top: 50px;
    #footer {
        text-align:center;
        margin-top: 700px;
        color:#0CF;
    .brunel {
        margin-top: 50px;
        margin-left: 400px;
    #workshops2{
        width: 1000px;
        border-style: outset;
        border-width: 5px;
        padding: 15px;
        border-color:#09F;
        background-color: #6CF;
        margin-left: 100px;
        text-align:center;
    #workshops2 a {
        color: #000;
    #sponsorspace {
        height:  300px;
        background-color: #6CF;
        border-style: outset;
        border-color: #09f;
        margin-top: 15px;

    Give #navbar a width that is wide enough to hold all of the buttons within it.
    #navbar {
         width:####px;
    Replace #### with a pixel number large enough to hold the nav buttons.

Maybe you are looking for