Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a timer?

Status
Not open for further replies.

allyeric

Programmer
Mar 14, 2000
104
CA
I am developing an exam online, and need to have a timer on the page, to count backwards from 15 mins to 0, displaying the minutes left.&nbsp;&nbsp;Is there any way to do this in HTML or VBScript?<br><br>Thanks in advance&nbsp;&nbsp;:eek:)<br><br>
 
You can use the window.setTimeout() function to wait sixty seconds, increment a counter, display how many minutes are left... when the counter gets to fifteen you can then act accordingly
 
thanks for answering jaredn - is that VBScript?&nbsp;&nbsp;
 
its done primarily in javascript, however I'm pretty sure it works in VBscript. Although it's bad for performance, you can have both JScript & VBscript running on one page. Also, if you're only supporting IE, try setInterval, otherwise you have to call the setTimeout within the function you are calling with it (if you need some help, I'll send you to a url you can see this at work)<br><br><br><A HREF="mailto:jared@aauser.com">jared@aauser.com</A>
 
thanks jaredn, please do send me the URL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top