Results 1 to 3 of 3

Thread: Close a window

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    369

    Close a window

    Hi,

    When I close a window with javascript " window.close(); "

    I always get a confirm window. How can I avoid that and close the window immediatly.

  2. #2
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: Close a window

    Himte.

    Youll always got a confirm message.

    The simple reason is tht the window youre trying to close will not close automatically if its not being opened by Javascript, adn you cant disable that at all i'm afraid...

    No way round this, however you could simply resize the window to ZERO and that would keep the window open, not look as embarrassing as a cinfirm but still do the job.

    Hope this helps

    Kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Close a window

    It's best to use window.close() only on windows that have been opened using javascript from the main page. It's less annoying that way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width