When I have a regular textbox in a UpdatePanel (not an ASP.NET control) with some JavaScript events on it, after the UpdatePanel updates my events are gone. Is there a way to re-attach my events after the update? (Preferably without putting my events inline).
+1
A:
You can have a setInterval()
loop on document load that would search for the element in the update panel and if it didn't have the events, it can re-attach them.
Mark Cidade
2008-10-01 19:19:27
A:
The events are gone because your textbox is a new element in the DOM (after the UpdatePanel refresh). As said by korchev, use the endRequest event to re-attach the eventhandlers.
Michiel Overeem
2008-10-01 19:45:20