Posted on: 7/9/2015 6:13:11 AM | Views : 711

I have a requirement that on button click, If dropdownlist value has not been selected, the error message has to be fired that "Please select the title" which is working.
But in these I have one more scenario, that on selection of "Others" from the dropdownlist a textbox gets open. That should also not be blank. but that is not working. Please suggest
Below is my code:-
<script type="text/javascript"> $(document).ready(function () { $('#btnSave').click(function () { if ($("#ddlTitle").val() > "0") { return true; } else { alert('Please select the title') return false; } if ($("#ddlTitle").val() > "0" && $("#txtTitle").val() === "") { ...

Go to the complete details ...