In the jQuery code, replace txtMyTextbox with #ClientID
>Actually in my code it is different syntax that uses the "ClientID" syntax. But UT would not let me type it. Here is how I name the control in my script, but where you see a dollar sign it is actually a percent sign.
>
>
>"<$=txtMyTextbox.ClientID $>"
>
>
>
>>My guess is that txtMyTextbox should be #txtMyTextbox.
>>
>>>I am trying to incorporate a jQuery Change function in an asp.net page that would make certain control invisible when user starts typing (making changes) in a text box. My initial test, just to call an alert() does not seem to work. Here is my code:
>>>
>>>
>>><script type="text/javascript">
>>> $(document).ready(function () {
>>>
>>> $("txtMyTextbox").change(function () {
>>>
>>> alert("Change Function Called");
>>>
>>> });
>>>
>>> })
>>></script>
>>>
>>>
>>>What is wrong with my code? TIA
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer