Results 1 to 3 of 3

Thread: window.close don't always work?

  1. #1

    Thread Starter
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    I want to have a hyperlink/button dat opens a file (say a PowerPoint file) and also closes the current browser window. This window is opened in dialog box style (no menubar/toolbar/statusbar)

    I used the following code:

    <a href="myPresentation.ppt" onclick="javascript:window.close()"><img src="go.gif"></a>

    In IE this works fine. IE asks for confirmation (open or save), opens the .ppt file and closes the window. This doesn't seem to work in Netscape though: the window didn't close. This seem to happen due to the confirmation dialog. If i delay the window.close statement then the window did close, but only if the confirmation dialog is clicked away.

    Have anyone come accross this? any solution?

  2. #2

    Thread Starter
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    can't be that no one has any answer to this?

  3. #3
    ines
    Guest
    this is your unlucky day cause I am soo lazy that I will just give you the url where you can find the answer to your question (in normal circumstances I'd go and look it up for you)

    http://developer.irt.org/script/script.htm

    look under windows, there you will definitely find the answer as to why and where and how.

    Good luck!
    ines

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