|
 |
aspx thread: Re: how long was navigation
Message #1 by "David Ibarra BancoSaenz" <dibarra@b...> on Thu, 26 Sep 2002 12:31:29 -0300
|
|
Anyone know how could I know how long that users is on the web page?. I
need to know how long the pupil is reading the page in order to save the
time in a DB.
Thanks in Advance
----- Original Message -----
From: "JAMES DONAHUE" <JDONAHUE@F...>
To: "ASP+" <aspx@p...>
Sent: Thursday, May 09, 2002 5:24 PM
Subject: [aspx] Re: Testing
> Sorry...I didn't realize it was being sent to aspx. I just noticed
> another message from a co-worker re: Bingo was sent to aspx too from my
> email account. I'm looking at it trying to find out why it's doing
> that.
> Jim
>
> >>> stephenb@w... 05/09 2:16 AM >>>
> Please do not send test messages. If you have something to say just
> say it!
> Keep it relevant though please, postings like this can result in
> unsubscription.
>
> Stephen
>
>
>
>
Message #2 by Jay Fields <JFields@c...> on Thu, 26 Sep 2002 11:54:00 -0400
|
|
On the page that you need timed write JavaScript to open a window that
records the time and closes when it is rendered. Then when the page is
unloaded write JavaScript to open a window that records when the user is
leaving the page and then close that window also. Try making the popup
window as small as possible, and make sure you return focus to the parent
window making it as "clean" to the user as possible. It's not very elegant,
but it's the only way I know that always works (provided JavaScript is
enabled).
example below, code for closeStamp.aspx is obviously similar enough to
openStamp.aspx I felt it wasn't need to include.
...
<script>
function stampTime(whichTime) {
window.open(whichTime)
}
</script>
...
<body onload="stampTime('openStamp.aspx')"
onunload="stampTime('closeStamp.aspx')">
...
[openStamp.aspx]
...
<script runat="server">
//code to insert current timestamp to DB
</script>
...
<body onload="window.close()">
-----Original Message-----
From: David Ibarra BancoSaenz [mailto:dibarra@b...]
Sent: Thursday, September 26, 2002 11:31 AM
To: ASP+
Subject: [aspx] Re: how long was navigation
Anyone know how could I know how long that users is on the web page?. I
need to know how long the pupil is reading the page in order to save the
time in a DB.
Thanks in Advance
----- Original Message -----
From: "JAMES DONAHUE" <JDONAHUE@F...>
To: "ASP+" <aspx@p...>
Sent: Thursday, May 09, 2002 5:24 PM
Subject: [aspx] Re: Testing
> Sorry...I didn't realize it was being sent to aspx. I just noticed
> another message from a co-worker re: Bingo was sent to aspx too from my
> email account. I'm looking at it trying to find out why it's doing
> that.
> Jim
>
> >>> stephenb@w... 05/09 2:16 AM >>>
> Please do not send test messages. If you have something to say just
> say it!
> Keep it relevant though please, postings like this can result in
> unsubscription.
>
> Stephen
>
>
>
>
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
Message #3 by "Chris Kersey" <ckersey@m...> on Thu, 26 Sep 2002 08:48:06 -0700
|
|
1. you can supply a log-out button that triggers an entry into a db table.
2. you can create a javascript popup that fires on the <body
OnUnload="javascript: LogoutUser(id);"> In LogoutUser, open the page in a
small popup (that says thanks for playing, or have it self.close()
immediately after processing, and on the backend of that popup, you
effectively terminate the user's session by logging him/her out in a db
table.
Other than that, the server cannot detect when a user is no longer viewing a
page because web pages are stateless. It would be too taxing for the server
to poll every browser that attaches to it to ask "is your browser still
looking at my url?".
You could listen for the Session Timeout event to fire, and determine who is
no longer active by grabbing that sessionId which you could associate with a
user. However, Session Timeouts are passive in that they wait for the
specified amount of inactivity before firing. You can set this amount of
time to your liking, however it wouldn't do you much good if you needed to
know down to the minute, and a student might take more than your session
time out setting to answer a question... and timeout.
Hope this helps.
----- Original Message -----
From: "David Ibarra BancoSaenz" <dibarra@b...>
To: "ASP+" <aspx@p...>
Sent: Thursday, September 26, 2002 8:31 AM
Subject: [aspx] Re: how long was navigation
> Anyone know how could I know how long that users is on the web page?. I
> need to know how long the pupil is reading the page in order to save the
> time in a DB.
>
> Thanks in Advance
> ----- Original Message -----
> From: "JAMES DONAHUE" <JDONAHUE@F...>
> To: "ASP+" <aspx@p...>
> Sent: Thursday, May 09, 2002 5:24 PM
> Subject: [aspx] Re: Testing
>
>
> > Sorry...I didn't realize it was being sent to aspx. I just noticed
> > another message from a co-worker re: Bingo was sent to aspx too from my
> > email account. I'm looking at it trying to find out why it's doing
> > that.
> > Jim
> >
> > >>> stephenb@w... 05/09 2:16 AM >>>
> > Please do not send test messages. If you have something to say just
> > say it!
> > Keep it relevant though please, postings like this can result in
> > unsubscription.
> >
> > Stephen
> >
> >
> >
> >
>
>
> ---
>
> ASP.NET 1.0 Namespace Reference with C#
> http://www.wrox.com/acon11.asp?ISBN=1861007442
>
> ASP.NET 1.0 Namespace Reference with VB.NET
> http://www.wrox.com/acon11.asp?ISBN=1861007450
>
> These books are a complete reference to the ASP.NET namespaces
> for developers who are already familiar with using ASP.NET.
> There is no trivial introductory material or useless .NET
> hype and the presentation of the namespaces, in an easy-to use
> alphabetical order ensures a user-friendly reference format.
> We provide in-depth coverage of all the major ASP.NET classes,
> giving you those real-world tips that the documentation doesn't
> offer, and demonstrating complex techniques with simple
> examples.
>
> ---
|
|
 |