I am attempting to convert a HTML form to XHTML. I am having problems with the validation script, which worked in the old form but not in the new one. The script makes sure that all the boxes are filled out before submitting.
I have both <input> and <textarea> elements. The script recognizes a blank <input> but not the blank <textarea>.
alert("Please enter your name");
alert("Please enter your mailing address");
The code below is your code with the [snip]s removed and your validation script prompts for both the name and email address if they are missing - but with your current code logic, only 1 at a time if both are missing.
The only thing I would normally do, but haven't done in your case, is put the opening and closing textarea tags on the one line.
Your code works fine in my IE8 and FF3.6
Maybe there is something else going on in your code that you haven't posted that is causing your problem.