I am having trouble with my javascript. It seems to be acting oddly. This is what\'s going on. I have a form, after the user submits it, it calls a function(onsubmit event)
These guys are right but I would also be sure to return the bool from the validation method so the submission of the form is cancelled if the form is not valid.
Something along the lines of:
You could also always return false from validateRegForm and have the xmlhttp.onreadystatechange = function() submit the form if it is valid, or otherwise display your error message.