I have a drop down list called 'profession'. If the proffession isn't on the list the visitor is asked to write it into a text box called 'other_profession'. If neither are selected I want my javascript form validator script to request it. I made the default value of the drop down list = x so if nothing is selected then I can check for a value of 'x' (don't know if thats the best way). Anyway... it doesn't work (as you can see my javascript is rather rough). Can anyone say what I'm missing? ;)
Extract from my javascript form validator script:
f = document.myForm;
if ((f.profession.value=="x") && (!(f.other_profession.value))) {
{ message += "Select your profession.\n";
submitOK="False"; }