At this point, the biggest cookie request I have will work with another solution I got from this forum.
I was given the JS which allowed me to put a timer on a page. It worked like this:
If the user tried to advance to the next page without taking the minimal amount of time to read the material, an alert notified them of their carlessness of the information and asked them to exit if they weren't going to take the time to read it.
Anyway, the pages that I want to apply this JS to contain links to the other pages (for reference purposes). So, in order for the timed page to work effectively, I need a cookie that will "keep track" of the time for each page.
The code looks something like this:
<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=http://www.webdeveloper.com/forum/archive/index.php/"next.htm" onClick="return checkspeed()">leave</a>
</body>
</html>
i.e. If the user follows one of the reference links on the timed page, the length of time remaining is stored with a cookie. When the user returns to that timed page, the timer continues from where it left off.
So even if the user exits the presentation, when the user returns, however long that might be (before it expires of course - 1 week) , the timer will pick-up where it left-off.
To make things more complicated (maybe), this presentation will be local, not on the NET.
Thanks in advance for your help!
~dmason165
I was given the JS which allowed me to put a timer on a page. It worked like this:
If the user tried to advance to the next page without taking the minimal amount of time to read the material, an alert notified them of their carlessness of the information and asked them to exit if they weren't going to take the time to read it.
Anyway, the pages that I want to apply this JS to contain links to the other pages (for reference purposes). So, in order for the timed page to work effectively, I need a cookie that will "keep track" of the time for each page.
The code looks something like this:
<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=http://www.webdeveloper.com/forum/archive/index.php/"next.htm" onClick="return checkspeed()">leave</a>
</body>
</html>
i.e. If the user follows one of the reference links on the timed page, the length of time remaining is stored with a cookie. When the user returns to that timed page, the timer continues from where it left off.
So even if the user exits the presentation, when the user returns, however long that might be (before it expires of course - 1 week) , the timer will pick-up where it left-off.
To make things more complicated (maybe), this presentation will be local, not on the NET.
Thanks in advance for your help!
~dmason165