Click to See Complete Forum and Search --> : Maybe a little tough...
dmason165
03-08-2003, 07:48 PM
Hello All,
Here is one that may actually take some time...I have no clue where to start...
Attached are the source codes for a page that notifies you if you have read the page too fast (you may have seen a similar function for software end-user agreements).
Anyhow, I need a script that I can use so that the viewer will be notified if caught trying to fly through the site's pages.
As always, thank you in advance for your time and help.
Sincerely,
~Darron
dmason165
03-08-2003, 07:50 PM
Here is the second part of the source of a Timed Page example I pulled from a website...
Nevermore
03-09-2003, 02:43 PM
Here is a nice simple timing javascript. To change the length of time they have to spend on the page, change the number in red. It is in milliseconds. The current value makes them spend one minute there before the link works. The alert text is in blue for you to change.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="Javascript" type="text/javascript">
<!--
firsttime = new Date();
function checkspeed() {
secondtime= new Date();
difference = secondtime - firsttime;
if (difference <= 60000 ){
alert("You're reading awfully fast. Don't you think you should take it a bit more slowly?");
return false;
}
else {
return true;
}
}
//-->
</script>
</head>
<body>
<a href="next.htm" onClick="return checkspeed()">leave</a>
</body>
</html>
Dan Drillich
03-09-2003, 03:51 PM
I would do something like -
<body onload="setStart()" onunload="checkTime()">
So, all exit points are covered.
Nevermore
03-09-2003, 03:52 PM
That won't let them go back - If the whole point is to get them to read it, going back to check on things would be quite useful, I should have thought.
webby
03-09-2003, 03:56 PM
this is tough, too tough for me to help
Nevermore
03-09-2003, 03:57 PM
Then don't post.
dmason165
03-09-2003, 08:11 PM
Hello All,
Thanks for the HUGE help!! I was wonderin' if anyone was going to be able to. I will try this out and post on its results within 24 hours.
Again, thank you for the help and your time!
Very sincerely,
~Darron
dmason165
03-09-2003, 09:23 PM
Cijori,
The code you gave me worked perfectly!! Thank you again.
What would I have to do (or what would have to be altered) in the script you gave me, so that a viewer could go back to the previous page without being restricted by the page's timer starting from scratch or resetting?
In other words, is there a way to make the timer pause while the viewer is reading another page (a page that is not restricted by the timer) and then continues when the viewer goes back to the timed page? This way, they can go back without the timer resetting.
If you need more information (like how it applies to my site), just let me know. Thank you for your time.
Take care!
~Darron