Then before you submit the form, double check and make sure that the selected Index property of the select object isn't set to the dummy value.If it is, prompt the user to make a selection, otherwise use the form's submit() method to submit the form.The easiest way to make ensure that a user picks a value from a dropdown list is to add a value to the top of the list that isn't really a valid choice, but a prompt instead. Make sure to set the value of this dummy item to a known value that won't conflict with the real choices in your list.
You have to check both years are selected and to date must greater than the from date. In such situation you can use three select boxes to enter birthday. This is a simple validation script that checks if the user has correctly entered his/her birthday.
Here's the code: Code: Hi everyone, My website has 10 drop down lists. I have written the code for form validation, but I am not sure where the code should be inserted, nor am I sure how to link it to the click of a submit button.
My code (without the form validation function) is as follows: Code: Groom's Age Groom's Caste Groom's Current Profession Groom's Monthly Salary Groom's Alma Mater The Groom is working in Groom's Skin Color Groom's Height Number of times the Groom has married before Groom's Father's Profession Hi there, I need help in form validation!
If the user chooses not to attend dinner, then there is no need to validate the Vegetarian option. If the user chooses not to attend dinner, then there is no need to validate the Vegetarian option.
I want to have a script that if one chooses to register for dinner, then validation will be performed to ensure whether the user have chosen that they are Vegetarian or not. I want to have a script that if one chooses to register for dinner, then validation will be performed to ensure whether the user have chosen that they are Vegetarian or not.
In other words, only the one form tag should be used, and that should surround all of the form fields that you want to be submitted.