For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > February 2005 > Re: [PHP-WIN] Re: Time limit in the script









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN] Re: Time limit in the script
Randy Clamons

2005-02-17, 4:01 pm

Using Javascript, try this function:

iTimerID =3D window.setTimeout(vCode, iMilliSeconds)

Set iMilliSeconds to one hour (60*60*1000 =3D 3600000)
vCode should call a function that submits the form for scoring. Something l=
ike "document.forms[0].submit()" should work, assuming there is only one fo=
rm on the page.

If your multiple choice test is several pages long, your problem is more co=
mplicated.

Randy Clamons
Systems Programming
Novaspace.com


> ------------Original Message------------
> From: "Reptilevl" <reptilevl@gmail.com>
> To: php-windows@lists.php.net
> Date: Thu, Feb-17-2005 0:58 AM
> Subject: [PHP-WIN] Re: Time limit in the script
>
> you could allways set a cookie with the timestamp in it and calculate
> problem is, that you won't be able to forward when it's exactly an hour =


> if =


> you know what I mean.
> =


> I made a similar thing once.
> I did the forms and stuff in PHP
> but I used Javascript for the timer.
> I would give you the code but i lost it in a format I'm afraid.
> but it worked like a charm.
> =


> I hope thise gives you an idea on how you can solve your problem
> =


> "Veselina Jecheva" <vessi@bfu.bg> wrote in message =


> news:5.0.2.1.0.20050215153924.00a022f0@masters.bfu.bg...
[color=darkred]
> =


[color=darkred]
> period of =


[color=darkred]
> him to =


[color=darkred]
> =


> -- =


> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> =


> =

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com