How to Close an unknown BrowserWindow


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to Close an unknown BrowserWindow

Hybrid View

  1. #1
    schmaddy Guest

    How to Close an unknown BrowserWindow


    I have a great problem ...
    I want to close new opened browser window, which name is unknown.
    In JavaScript there are no possibilities to close this new window, so i have
    to try this attempt in java.

    Please, i you can answer my question, so tell me your solution.

    Thank you ... schmaddy

  2. #2
    Paul Clapham Guest

    Re: How to Close an unknown BrowserWindow

    If you want to write a Windows program to close another window, you have to
    know something about that other window. (I expect it's the same in Unix;
    you didn't say what OS you are using.) Even if you did, there is nothing in
    Java to do that.

    schmaddy <schmaddy@yahoo.com> wrote in message
    news:394f7100$1@news.devx.com...
    >
    > I have a great problem ...
    > I want to close new opened browser window, which name is unknown.
    > In JavaScript there are no possibilities to close this new window, so i

    have
    > to try this attempt in java.
    >
    > Please, i you can answer my question, so tell me your solution.
    >
    > Thank you ... schmaddy




  3. #3
    Paul Clapham Guest

    Re: How to Close an unknown BrowserWindow

    I just realized -- maybe that means, close the window the JavaScript is
    running in! If that's what you want to do then according to the JavaScript
    documentation:

    Closing a Window

    You can close a window with the close method. You cannot close a frame
    without closing the entire parent window.

    Each of the following statements closes the current window:

    window.close()
    self.close()
    close()

    (end quote)
    And if you created the window yourself in JavaScript, by newWindow =
    window.open(URL), then just do newWindow.close().

    schmaddy <schmaddy@yahoo.com> wrote in message
    news:394f7100$1@news.devx.com...
    >
    > I have a great problem ...
    > I want to close new opened browser window, which name is unknown.
    > In JavaScript there are no possibilities to close this new window, so i

    have
    > to try this attempt in java.
    >
    > Please, i you can answer my question, so tell me your solution.
    >
    > Thank you ... schmaddy




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center