Basic Javascript question

  • Thread starter Thread starter Ashok Gopalan
  • Start date Start date
A

Ashok Gopalan

How do I attach a client-side validation script in a web form page for a
text box control. The intellisense dropdown does not show the common
"OnChange" event.

Any help is greatly appreciated.

Regards,
AG
 
I think you need to use the textchanged event, the
intellisense dropdown lets you choose "ontextchanged".

Hope this helps :)
 
Hi
Here is a sample code which is used to attach a server
side control to the client side javascript.

txtSenderName.Attributes.Add("onClick","return doValidate
();");
<controlname>.Attributes.Add("<event name of the
control>","<javascript function name>");

thanks
srinivas moorthy
 
Thanks for your prompt response. Appreciate it!

If I use the "OnTextChanged" event, I get a compile error; in fact I do not
get any errors if I choose "Onchange" event even though the event is not
available in intellisense. I would assume that one can only code for those
members that show up in intellisense. Maybe I am wrong!! Would appreciate
any further clarification.

Thanks

AG

Thanks for your prompt response. Appreciate it!

If I use the "OnTextChanged" event, I get a compile error; in fact I do not
get any errors if I choose "Onchange" event even though the event is not
available in intellisense. I would assume that one can only code for those
members that show up in intellisense. Maybe I am wrong!! Would appreciate
any further clarification.

Thanks

AG

Thanks for your prompt response. Appreciate it!

If I use the "OnTextChanged" event, I get a compile error; in fact I do not
get any errors if I choose "Onchange" event even though the event is not
available in intellisense. I would assume that one can only code for those
members that show up in intellisense. Maybe I am wrong!! Would appreciate
any further clarification.

Thanks

AG
 
Back
Top