topical media & game development
#javascript-code-12-submit.js / js
function watchForm( form ) {
// Watch the form for submission
addEvent( form, 'submit', function(){
// make sure that the form's contents validate correctly
return validateForm( form );
});
}
// Find the first form on the page
var form = document.getElementsByTagName( "form" )[0];
// and watch for when its submitted, to validate it
watchForm( form );
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.