I am using below JavaScript, which is not working, where i am making mistake
$(document).ready(function () {
$("[id$=btn_Gen]").click(function () {
if ($("[id$=lbdispatchID]").val() > 0)
{
//Selected option from dropdownlist
alert("Please Select Dispatch.");
return true;
}
else if ($("[id$=ddlcurrency]").val() > 0)
{
//Not selected so alert user to select any option
alert("Please Select Currency.");
return true;
}
});
});
If else condition is not working.