I want to do some server side operation on close of a browser. I created
a server side html button and invoked a post back event on close of
browser something like
__doPostBack('btnUnlock',''); What I realised this is unreliable as the
operation is yet not completed when the browser has closed and
essentially the thread would have been killed. Is there any way in
javascript wherein I post a message to the server, wait for the response
and then the window closes something like send message and wait for the
response.
Regards
RJN
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!RJN <rjn@.yahoo.com> wrote in news:#uju2BxoEHA.556@.tk2msftngp13.phx.gbl:
> Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
>
There is no way to ensure this will fire. Client side javascript can be
disabled or stopped in many ways.
Instead, use the Session End event handler in the Global.asax.
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/

Yes, there is a very simple way. Post your message (it doesn't have to be
hacker style _doPostBack, it can be any value passed to the server in one of
legal and documented ways) and, in the response, get server-side to emit
window.close() javascript statement.
Eliyahu
"RJN" <rjn@.yahoo.com> wrote in message
news:%23uju2BxoEHA.556@.tk2msftngp13.phx.gbl...
> Hi
> I want to do some server side operation on close of a browser. I created
> a server side html button and invoked a post back event on close of
> browser something like
> __doPostBack('btnUnlock',''); What I realised this is unreliable as the
> operation is yet not completed when the browser has closed and
> essentially the thread would have been killed. Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
> Regards
> RJN
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
0 comments:
Post a Comment