Javascript Essentials Part 5

Talk about form controls via Javascript. I have been hunting down js control over forms from the day I started web development. I love the control over programming and its essential too. Here in this javascript essentials part I will share with you some essential form controls.

  • Accept Terms & Go
  • Advanced Email Address Validator
  • Auto Drop Down List – Select from drop down and list updates accordingly
  • Auto Month DropDown with Date and Year
  • Auto Phone Number Format
  • Auto Tab
  • Character Counter
  • Check Un-check all from check boxes
  • Check Un-check all 2
  • Characters Disallow
  • Preview Image While Uploading
  • Submit Once

Accept Terms and Go

This script is about forcing user to click check box in order to accept terms or policy.

<!-- Original:  Colin Pc  -->
<!-- Web Site: -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! -->
<!-- Begin
function checkCheckBox(f){
if (f.agree.checked == false )
alert('Please check the box to continue.');
return false;
return true;
//  End -->
<form action="" method="POST" onsubmit="return checkCheckBox(this)">
I accept: <input type="checkbox" value="0" name="agree">
<input type="submit" value="Continue Order">
<input type="button" value="Exit" onclick="document.location.href='backpage.html';">