|
-
Jun 21st, 2001, 05:04 AM
#1
Thread Starter
Hyperactive Member
Running code on Unload
I need to run some ASP code when I go to close down the browser. I can run Javascript no problem, but I just need to run a funcation that I have set up in me ASP Code.
Can anyone help?
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
Jun 21st, 2001, 06:27 AM
#2
Black Cat
There's really no way ASP could know when the browser closes.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 21st, 2001, 07:22 AM
#3
Thread Starter
Hyperactive Member
Can you not run some ASP code by calling <BODY OnUnload="??">
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
Jun 21st, 2001, 09:14 AM
#4
Lively Member
Do yourself a favor, save yourself time. Just put an alert in the unload event. You will see it fires every time even if you refresh your browser.
I wanted to the same effect, but if you refresh ... the function executes...
-
Jun 21st, 2001, 10:29 AM
#5
Black Cat
Can you not run some ASP code by calling <BODY OnUnload="??">
Just client-side code. You could possibly request an ASP page there to get ASP code to execute, but if the browser is closing, I'm not sure if it will actually request the ASP page.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 21st, 2001, 10:41 AM
#6
Thread Starter
Hyperactive Member
Thanx for that, sorted it, just in case it may be of help to you heres how its done.
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function MM_goToURL()
{
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</SCRIPT>
</HEAD>
<BODY OnUnLoad="MM_goToURL('parent','unload.asp')">
I just had unload.asp do the work.
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|