Reputation: 705
I've 1 textbox, its for getting DateTime value,First the user has to fill the DateTime textbox before selecting the vehicle dropdown. If that textbox is blank i ve to popup a message.. I am trying to validate but its not responding.. the code is,
function Validate_VehicleDropdown()
{
var RequestDateTime=$get('<%=ui_txtRequestDateTime.ClientID %>')
if(RequestDateTime.value=="")
{
alert("Please Enter RequestDateTime Before Selecting Vehicle");
RequestDateTime.focus();
return false;
}
I called that function inside Dropdown control as
onblur="javascript:return Validate_VehicleDropdown();
What mistake i ve done here?? give some idea?
Upvotes: 1
Views: 935
Reputation: 14012
For one, you do not need to use javascript:
in the blur part. That is primarily for hyperlinks.
Secondly, perhaps you could check your browsers JavaScript logs for errors.
In Internet Explorer 9 press F12
In Firefox download firebug.
In Chrome press CTRL + SHIFT + J
Upvotes: 1