Category Archives: JavaScript

Notes on using JavaScript

Validating all fields on a form

The following Javascript can be used to verify that a value has been entered in all fields on a form. function validate(form) { var regex = /\w+/; for(var i = 0; i < form.length; i++) { var curr_el = form.elements[i]; … Continue reading

Posted in JavaScript | Comments Off on Validating all fields on a form