By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

capture destination URL in onUnload

P: n/a
for use on Intranet, need to identify when user leaves the Intranet,
and have that trigger a function (on a new asp page) to use session
variables to do an update.

I have something that identifies when a user closes their browser,
but not when they simply leave the site for another site (complete
with testing alerts to verify each stage):

<script language="JavaScript" type="text/JavaScript">
<!--
function openAVWindow() {
// grab window position to determine if browser has been closed. grab
URL
var win = this;
{
var winpos = win.event.clientX;
alert("winpos = " + winpos);
var exiturl = document.location.href;
alert("exiturl = " + exiturl);
}
// if winpos is negative (browser was closed) open window to insert
exit
values into AuditView
if (winpos < 0)
{

window.open('/inc/UpdateAVUser.asp?AVID=<%=AVAuditViewID%>','AVUpdat e','resi
zable=0,status=1,scrollbars=1,location=1,toolbar=1 ','width=10,height=10');
alert("popup = yes" + exiturl);
}
}
//-->
</script>
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 2 Mar 2004 22:22:21 -0800, pu*************@yahoo.com (Isaac Fig
Newton) wrote:
for use on Intranet, need to identify when user leaves the Intranet,
and have that trigger a function (on a new asp page) to use session
variables to do an update.


Can't be done, I'm sure it's easier to just fix your server handling -
after all when the network goes down, or the person undocks their
laptop, you'll be in the same lost situation.

http://jibbering.com/faq/#FAQ4_29

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.