Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: capture info onload


Message #1 by abel09@u... on Thu, 5 Dec 2002 03:18:34
I'm trying to capture the user's info when he enters a specific page and 
release the info upon window unload. Here is what I've tried, but it does 
not work.
Could anyone please help me.

<SCRIPT LANGUAGE=vbscript>
Sub Window_OnLoad()
<%
rsTicket("user")= Session("FirstName")&" "&Session("LastName")
rsTicket.Update%>
End Sub
</script>
..
..
CODE HERE
....
....
 <SCRIPT LANGUAGE=vbscript>
Sub Window_OnUnLoad()
<%
rsTicket("user")= " "
rsTicket.Update
%>
End Sub
</script>
Message #2 by abel09@u... on Thu, 5 Dec 2002 13:46:58
I have actually rewrote the code but the first update does not execute. 
Here is the code.

Thx


 <SCRIPT LANGUAGE=vbscript>
Sub Window_OnLoad()
<% 
If rsItem("user")=" " or rsItem("user")="<NULL>" then%>
MsgBox"Good-No current user"
<% 
rsItem("user")= Session("FirstName")&" "&Session("LastName")
rsItem.Update
Else%>
MsgBox"Record is in use"
<% End If
%>
End Sub
</script>
 <SCRIPT LANGUAGE=vbscript>
Sub Window_OnUnLoad()
<%
rsItem("user")= " "
rsItem.Update
%>
End Sub
</script>

  Return to Index