Results 1 to 2 of 2

Thread: How to automatically close window without prompt?

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2002
    Posts
    61

    How to automatically close window without prompt?

    How do I use the window.close() java function without that confirm pompt box coming up?

    What I want is: as soon as the user gets to my start page, a popup window is launched (using the window.open() command) and the start page is automatically closed down.

    When my start page is loaded, I use a java function I wrote that contains the window.open() command to launch the pop-up. That line of code is followed by wiindow.close(). That works with the pop-up launching but before the main page closes itself, it first presents the user with a kind of "Are you sure?" promt and asks to press "Yes" or "No" to confirm before closing that window. I don't want that promt to come up at all, I just want the main browser window to close unconditionally as soon as the pop-up launches.

    Thanks.

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Hi,

    you cant close a window that you haven't opened. Its a security feature on browsers. If they are allowed you to close windows without a prompt some websites would exploit it by closing other browser windows you might have open.
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

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