1

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?

0

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

1

you can use the onchange event instead of onblur

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.