Re: timer in front page
From: Kevin Spencer (kspencer_at_takempis.com)
Date: 07/20/04
- Next message: Jim Buyens: "Re: Unable to "save as" with an open web"
- Previous message: Jim Buyens: "Re: empty files after publishing"
- In reply to: mo: "timer in front page"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Jul 2004 16:57:56 -0400
Well, it's got to be a little more complicated than that. For example, while
you could certainly add a timing element to a web page, telling the user
that their time is up isn't going to prevent them from continuing with the
test. One solution would be to use JavaScript to submit the form when the
time runs out, so that the user could not continue. This could be done by
defining a JavaScript function to submit the form, and using another script
to set the time that the first function would be delayed from running.
Example:
<script type="text/javascript"><!--
function submitForm()
{
document.forms[0].submit();
}
setTimeout("submitForm()", 30000);
// --></script>
The JavaScript setTimeout() function takes 2 parameters. The first is the
name of the function to execute. The second is the number of milliseconds to
wait before executing. In my example, it would execute in 30 minutes.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things. "mo" <anonymous@discussions.microsoft.com> wrote in message news:0d5901c46e97$d11025f0$a501280a@phx.gbl... > Im trying to design a multiple choice test within the > WebPage with a timer. The timer could be started with a > mouse click so that the user would know when the time > runs out. they cannot work on the test anymore. How do > you put a timer into the WebPage? > > please help
- Next message: Jim Buyens: "Re: Unable to "save as" with an open web"
- Previous message: Jim Buyens: "Re: empty files after publishing"
- In reply to: mo: "timer in front page"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|