473,465 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

capture destination URL in onUnload

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
1 6133
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: kaeli | last post by:
Hey guys, This error occurs ONLY in Netscape 7.0. Not in 7.1. So, I think it's a bug. Buuuut... Has anyone had this problem or know of a fix? When attempting to have an onunload function...
4
by: TDonohue | last post by:
I am trying to kill a cookie using onUnload if a user leaves the site or closes the browser window so someone else can't get a person's session. Does anyone know if there's a way to check where...
2
by: Derek | last post by:
Hello: I want to capture the event when a browser is closing, to give to the user the posibility of close or no this browser. When the browser is closing, this show a confirm window with two...
3
by: Laurent | last post by:
I am trying to use the onunload event to know when the user closes a popup by receiving a request on the web server. I have a main page from where the user opens a popup. What I want is when the...
15
by: Magix | last post by:
hi, let say I have this string +CCED: "xxxxxxxxx", 333 What is the most efficient way to capture the string within the " " ? which is xxxxxxxxx xxxxxxxxx can be any string.
4
by: feng | last post by:
Hi, In our asp.net app, we need to capture the event when user close the browser window by clicking on the "x" button. But it doesn't seem to be as easy as it sound. Can someone show me how to...
0
by: Berry W | last post by:
Hi, I'm trying to capture hidden window's data that is in IE's AxSHDocVw.AxWebBrowser ActiveX control. If Control and window are visible, code below works but if Control and it's window is...
1
by: jcmag | last post by:
I would like to take a "screen capture" of just a Form. I've done the following: internal void CaptureScreen() { Graphics g1 = CreateGraphics(); Image MyImage = new...
6
by: yossico | last post by:
Hi, I have a question which is related to an old question submitted in this forum but was not fully answered. The original question is at Any way to identify/capture back button event? . ...
7
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.