Perl File snippet:

Javascript: /* SOURCE FILE: form_validation.js */ function formValidator(){ var place = document.getElementById("place"); if(isNumeric(place, "Please enter a valid zip code")){ return true; } return false; } function isNumeric(elem, helperMsg){ var numericExpression = /^[0-9]+$/; if(elem.value.match(numericExpression)){ return true; }else{ alert(helperMsg); elem.focus(); return false; } } Unfortunately, because I'm a newbie I don't really understand how to usefully incorporate the various modules that are out there. I installed the JavaScript::DataFormValidator module this morning, but am not sure how to incorporate it yet. The only modules I am utilizng in my program currently are DBI and CGI. I don't really know the details of what they do. I just know that the tutorials I've been taking told me to use them :) The idea of putting my javascript into a perl string is intriguing. However, it seems that my code could get real messy real quick. Is it common in Perl to call functions/variables/etc from an external Perl file (like you can in JS "..SRC="/js_validation/js.js">" )? If so, maybe storing my javascript in a variable within an external file would be a good way to do this?
Test Field: