Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: help required for window.close()


Message #1 by "Ashutosh Shrivastava" <ashutoshs@i...> on Tue, 19 Mar 2002 00:44:26 +0530
Well in IE you can use onbeforeunload event to execute script just before 
page is unloaded, thet doesn't mean they've closed it, just left the page, 
similarly onunload.

Joe


>From: "Ashutosh Shrivastava" <ashutoshs@i...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] RE: help required for window.close()
>Date: Tue, 19 Mar 2002 23:18:15 +0530
>
>Hi,
>I am re-sending this question could not got any response for this.
>Please, if any one is aware of such a situation or can throw any input for 
>this then let me know.
>
>Thanks and regards,
>Ashutosh
>
>		-----Original Message-----
>		From:	Ashutosh Shrivastava
>		Sent:	Tuesday, March 19, 2002 12:44 AM
>		To:	javascript
>		Subject:	[javascript] help required for window.close()
>
>		Hi ,
>
>		I want to send a request to the servlet when the client closes the 
>browser.
>		To avail this functionality I used the JavaScript functionality as 
>mentioned below, but it didn't work.
>
>		<script>
>		function fire()
>		{
>		   window.document.location.href = 
>"http:\\192.168.46.15:17590\<abcServlet>?logout=true&close=y"
>		}
>		</script>
>
>		Can some body please, tell me a better way to achieve this target.
>
>		Thanks and regards,
>		Ashutosh
>
>




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


  Return to Index