time out




JavaScript Source Code 3000: Forms: Time Out









































Time Out







Limit the time allowed for form input with this short script. Easy!





(Refresh browser to restart counter.)


Time Remaining:











JavaScript Source Code 3000: Forms: Time Out
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!





    





<!-- THREE STEPS TO INSTALL TIME OUT:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Sergio Mottura (sergio1@onebox.com) -->
<!-- Web Site: http://www.bassprotips.com -->
<!-- Modified: Benjamin Wright, Editor -->

<! >
<! >

<!-- Begin
var i = 0;
var done = 0;
var totalSecs = 10;
function SecondPast() {
if(totalSecs != null) timerId = setTimeout("SecondPast()", 1000);
if(i < totalSecs) {
i += 1;
document.clock.seconds.value = totalSecs - i;
}
}
function doSub() {
if(i < totalSecs) {
done = true;
}
else {
alert("Sorry, you exceeded the time limit.");
done = false;
}
return done;
}
// End -->
</script>

</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="SecondPast()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document -->

<center>
<form name="clock" onSubmit="return doSub();">
Time Remaining:
<input type=text name="seconds" value="0" size=6>
<br>
<br>
<input type=textbox name="info" value="Test to submit">
<input type=submit value="Submit">
</form>
</center>



<!-- Script Size: 1.71 KB -->











Wyszukiwarka

Podobne podstrony:
Andromeda S04E20 Time Out Of Mind
session time out
Cranberries Time is ticking out
120320125306?c tewsc?t out?g
THE CLOCK zegar telling the time podawanie godzin i cwiczenia
The Time Machine Wehikuł czasu FullHD 1080p DTS AC3 5 1
Mystikal Smoked Out
Clawfinger Waste my Time
[4x06] Prison Break Blow Out
date time short
L1 III Pol Normy okluzji hend out(1)
The Time of the?rk
lights out
close out project?C97419
date time long
Prepositions of Time

więcej podobnych podstron