JavaScript Page 10 - Understanding The JavaScript Event Model (part 2) |
And that's about all we have time for. In this article, I took you a little further into the wild and wacky world of the JavaScript event model, explaining how the Event object can be used to do ever more complex things on your Web page. You learned how to manipulate the width and height of the browser window, how to identify the position of the mouse cursor on a page (and use that location to make something happen on the page), and how to track and intercept keyboard and mouse events. While this two-part tutorial covers most of the basic techniques associated with event handling in JavaScript, it isn't the end of the line for you. There are some excellent resources out there that you should look at in order to gain insight into more advanced event handling techniques - and I have a list of the better ones: The JavaScript Programmer's Reference, at http://www.irt.org/xref/ Events and JavaScript, at http://www.webdevelopersjournal.com/articles/jsevents1/jsevents1.html The Event Object, at http://www.webreference.com/js/column10/eventobject.html Event Bubbling, at http://www.webreference.com/js/column10/eventbubbling.html Events in JavaScript: An Inside Look, at http://www.wdvl.com/Authoring/JavaScript/Events/ Have fun, and I'll see you soon! Note: All examples in this article have been tested on Windows 95 with Internet Explorer 5.x+ and Netscape Communicator 4.x+. Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!
blog comments powered by Disqus |