As title states, i have a DropdDown and i need to stop user submitting form if he hasn't selected anything in Dropdown
i am using (for testing purpose)
Expand|Select|Wrap|Line Numbers
- alert($("#DivId option:selected").val().length);
Expand|Select|Wrap|Line Numbers
- if ($("#DivId option:selected").val().length == 0);
- {
- alert('please choose dropdown 2');
- return false;
- }
Can somebody please help me where i am going wrong, Its something very minor and frustating.
Any help will be appreciated.
Regards