mixing the javascript code to .net
-
just a follow-up on my previous post, I use the javascript command, window.close to close the window of the site, and also i need to dispose the session using the session.abandon. the problem is that there is a confirmation windows upon closing the site, how can i use the client side render confirmation to trigger the command to dispose the session on the server side
-
just a follow-up on my previous post, I use the javascript command, window.close to close the window of the site, and also i need to dispose the session using the session.abandon. the problem is that there is a confirmation windows upon closing the site, how can i use the client side render confirmation to trigger the command to dispose the session on the server side
That confirmation you are getting is because of the window.close. You can fix this by setting the opener = this. Then you would no longer get the confirmation to close the window. As far as how to do the session abandon you should probably implement some ajax, since you can call that from your javascript and that can run some code back on the server side. Hope that helps. Ben