Results 1 to 5 of 5

Thread: closing IE window

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    120

    closing IE window

    i m trying to find out when the user is closing an IE window and give him a message box telling him to close from another place and cancel his request to close the window.
    any help would be appreciated .

    10x
    shachar shaty

  2. #2
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    I have the same question. I got it to work with vbscript (and javascript)

    Sub window_onclose()

    Msgbox "Closing"
    End Sub

    It worked great... but the problem was if the user refresh the screen, he gets the msgbox also.

    But I never look further into it. If you get it.. please post it.

    Thanks

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    120
    ok but when do you call this procedure
    shachar shaty

  4. #4
    Sadovod
    Guest

    body onUNload

    I would use <body ="onunload=callYourOwnJScriptFunction()">
    where you can re-open the same window and give the user any instructions.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    120
    yes i know that but i dont want him to close the window because this window is a part of an ASP project with VB ocx that i have to set to nothing when i get out thats the reason i want to know how to cancel the closing of the window like in VB when you write cancel=true.
    shachar shaty

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