Search the Community
Showing results for tags 'pursue addevent events'.
In the next to last bullet exercise on Chapter 8's Pursue, I tried substituting U.addEvent(U.$('theForm'), 'submit', setHandlers); // W3C form for U.$('theForm').onsubmit = setHandlers; // traditional form in events.js and it didn't work. Why not? What it seemed to do was the default behavior - reset the form, without calling any handlers. On the other hand, I was able to add a second event listener to the form submission and it worked, i.e., this worked: U.$('theForm').onsubmit = setHandlers; // traditional U.addEvent(U.$('theForm'), '