Window Close event.

Results 1 to 2 of 2

Thread: Window Close event.

  1. #1
    Join Date
    Dec 1969

    Default Window Close event.

    I have searched this site and cannot find the answer I am looking for, so if anyone can help please reply.<BR><BR>I have page A. that users select search criteria from. On submitting page A. I have a popup window with nothing more that the word LOADING on it. When page B. (the window with the loaded XML asp formatted data in it) finishes loading, I want the popup to close. Unfortunatly, I cannot get this done.(the closing of the popup part)<BR><BR>The site is old and I cannot change the scripting language from VBSCRIPT.<BR><BR>Help?

  2. #2
    Join Date
    Dec 1969

    Default Best to have popup close itself...

    Which is of course just<BR> self.close( )<BR><BR>But in order for it to know *when* to do so, it needs to look for something to happen in the opener window.<BR><BR>So you might do something like this in PageB:<BR><BR>&#060;SCRIPT Language="VBScript"&#062;<BR>Dim AllDone<BR>AllDone = Null<BR>&#060;/SCRIPT&#062;<BR><BR>&#060;BODY onLoad="AllDone = 999"&#062;<BR><BR>*********<BR><BR>Then, in the popup, you do something like this (my VBS in client is virtually non-existent, so fix it, please):<BR><BR>&#060;SCRIPT Language="VBScript"&#062;<BR>Sub Check( )<BR> Dim op<BR> op = Null<BR> On Error Resume Next<BR> op = window.opener.document.AllDone &#039; ".document" may be extraneous?<BR> On Error GoTo 0<BR> If op = 999 Then <BR> Self.Close( )<BR> Else<BR> setTimeout( "Check", 500 ) &#039; check every half second<BR> End If<BR>End Sub<BR><BR>&#039; must get this started:<BR>Check<BR>&#060;/SCRIPT&#062;<BR><BR>

Posting Permissions

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