Thursday, May 23, 2024
 Popular · Latest · Hot · Upcoming
123
rated 0 times [  129] [ 6]  / answers: 1 / hits: 25419  / 13 Years ago, mon, june 27, 2011, 12:00:00

I have a table row with ONCLICK event (that toggles additional data below). Inside one of the row cells I have a button (when clicked is performing an AJAX action).
When I click on the button - the Row's onclick event also fires and what happens is that the additional data appears before the AJAX call completes (which is a bad behavior for me).
Any ideas how can I solve this elegantly? (without identifying and coding it into the row's onclick code)
Thanks


More From » html

 Answers
4

Add an event.stopPropagation(); to your buttons click handler. For more information, have a look here.


[#91485] Friday, June 24, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
claudia

Total Points: 734
Total Questions: 106
Total Answers: 113

Location: Sweden
Member since Fri, Apr 16, 2021
3 Years ago
;