Search the Community
Showing results for tags 'event handling'.
-
This one's a simple question, I am just trying to figure out where the supplementary markup code for the code is? I am fine coding this myself though, I was just making sure otherwise I will also check the source files provided on Larry Ullman's site. Figure 8.7/8.8 displays the form on reporting events on page 292. Thanks, Mark
-
This chapter discusses a topic on keyboard events. I have provided links to my dev website. On page 284, the "change" event is added to the U.addEvent method. U.addEvent(U.$('comments'), 'change', limitText); http://www.sandiegowebcreative.com/text.html On page 284, the "keyup" event is added to the U.addEvent method. U.addEvent(U.$('comments'), 'keyup', limitText); http://www.sandiegowebcreative.com/text2.html I don't notice the difference between the two. I receive the same results from my browser, or I may not be noticing that which i
- 3 replies
-
- event handling
- keyup
-
(and 1 more)
Tagged with:
-
in chapter 8 there is a file (events2.js) updated to use the Utilities Object. However, when linked to events.html the code does not work. It resets the form on submit. The difference I found is the anonymous function called for the onload event of the window object. What I don't understand is why the events2.js doesn't work: ---- events2.js ---- window.onload = function() { 'use strict'; U.addEvent(U.$('theForm'), 'submit', setHandlers); }; ---- events.js ---- window.onload = function() { 'use strict'; U.$('theForm').onsubmit = setHandlers; }; ---- addEvent() ----
-
I don't understand how to use e - so I've created a small form to test my understanding of event handling. The form requires a radio button to be checked. If I submit the form without checking a button the error message appears but then the form appears to be locked and I can't check a button. Firebug stops at this line U.stopDefault(e); which seems correct. Do I need to reset something? HTML <body> <form id="optInForm" method="post" action="optIn.php"> <fieldset><legend>Agree</legend> <label for="yes">Yes </label><input type="radio" nam