Validate select fields based off drop down selection
I'm trying to validate select fields depending on the drop down selection. I have also tried
- if ($('#PropertyOwnership').val() != "Property Owner") {
nothing is working. How do I fire select validation based off of what the user selects from the dropdown?
The jQuery:
- if ($('#PropertyOwnership').attr("value") != "Property Owner") {
- aReturn = ValidateItem('RentalContactsName', true, "Please enter the contact's name.", null, true);
- if (!aReturn) return aReturn;
- }
The HTML:
- <div><select id="RentalPropertyOwnership" name="RentalPropertyOwnership">
- <option value=""> - Please Select - </option>
- <option value="Property Owner">Property Owner</option>
- <option value="Corporation">Corporation</option>
- <option value="Limited Liability Company">Limited Liability Company</option>
- <option value="Limited Partnership">Limited Partnership</option>
- <option value="Partnership">Partnership</option>
- <option value="Real Estate Investment Trust">Real Estate Investment Trust</option>
- <option value="Trust">Trust</option>
- </select></div>