Venkat (ADDA) Kandaswamy

another Gotcha – adding event to dynamically added control

This time the culprits were Chrome and IE.

The table I dynamically pulled had a select all button. But the onclick was never getting fired. The work around was quite simple. I had to attach the event to the control once again. Then the onclick event worked.
Attaching the event is quite simple. 
document.getElementById(‘button’).onclick = functionName;
Close Bitnami banner
Bitnami