Skip to content
Advertisement

Tag: dom-events

Avoiding a Javascript race condition

My users are presented a basically a stripped down version of a spreadsheet. There are textboxes in each row in the grid. When they change a value in a textbox, I’m performing validation on their input, updating the collection that’s driving the grid, and redrawing the subtotals on the page. This is all handled by the OnChange event of each

Getting the ID of the element that fired an event

Is there any way to get the ID of the element that fires an event? I’m thinking something like: Except of course that the var test should contain the id “aaa”, if the event is fired from the first form, and “bbb”, if the event is fired from the second form. Answer In jQuery event.target always refers to the element

Advertisement