The Timer is defined like this:
<asp:Timer ID="Timer1" OnTick="Timer1_Tick" runat="server" Interval="1000" Enabled="false" />
When calling $find("<%= Timer1.ClientID %>")._startTimer(); I’m getting this error:
Microsoft JScript runtime error: Unable to get value of the property ‘_startTimer’: object is null or undefined
and when calling $('#Timer1')._startTimer(); I’m getting this error:
Microsoft JScript runtime error: Object doesn’t support property or method ‘_startTimer’
Any advice will be welcome.
Try passing
$find()the shorter server-side (or “Component”) ID:You may also be able to use
$get()with theClientID:With jQuery, pass it the
ClientIDas with$get()and use.get(0)to retrieve the DOM Object from the jQuery collection: