alert("Please enter a valid email address");
return false;
Form validation of the pattern if(myTextField.value == ") is barely worthy of the name, and virtually useless, as even a single space, an X or a ? will return false, that is pass the validation. Numeric values, such as zip codes and phone numbers, should be validated as such. Ditto email addresses. This topic has been covered many times before in this forum.
In the first book of the Bible, Guinness, God got tired of creating the world so he took the Sabbath off. - Pupil's answer to Catholic Elementary School test.
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
You are calling two functions that you did not include (getCheckedValue and makeVote).
I am not sure, but I don't think var name = "data" +
"more data" +
"even more"; is valid or good JS. Try var name = "data";
name += "more data";
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
I am not sure, but I don't think var name = "data" +
"more data" +
"even more"; is valid or good JS.
WHAT???
Pardon, but how did you come by that belief?
Of course it's both valid and good JavaScript.
The + operator, whether used to really do arithmetic addition or string concatenation, returns the added/concatenated value as its result. So of course you can then add or concatenate further.
But if your function submit_vote() still looks like it did in your first post in this thread, then it is COMPLETELY UNNECESSARY!
The browser will *AUTOMATICALLY* encode all your <form> elements for you and will automatically send them as a post-date string when the <form> is submitted.
If you are trying to do this as an AJAX call, then you are going about it all wrong. If this is the case, then show us the code for your make_vote( ) function.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.