Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs

 
Search
 



WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us
Prepaid Phone Card
Imprinted Promotions
Build a Server Rack
Shop Online
Computer Hardware
GPS
Phone Cards
Condos For Sale
Compare Prices
Baby Photo Contest
Promotional Products
Boat Donations
Data Center Solutions
Car Donations

Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Storage Networking , Part 1
eBook: A storage network is any network that's designed to transport block-level storage protocols. But understanding the ins and outs of networked storage takes you deep into several of protocols. This guide covers SANs, Fibre Channels, Disk Arrays, Fabric, and IP Storage. »

Storage Networking 2, Configuration and Planning
eBook: Picking up where Part 1 left off, Part 2 of our look at storage networking examines configurations for SAN-attached servers and disk arrays, and also includes a look at the future of IP storage. »

Storage Management Costs in the Enterprise: A Comparison of Mid-Range Array Solutions
Whitepaper: Many factors contribute to the ownership cost for enterprise storage. These include (but are not limited to): physical capacity relative to physical space requirements, performance capacity for data transfer and system reaction time, software maintenance and updates, expandability and flexibility, and much more. »

Storage Is Changing Fast  Be Ready or Be Left Behind
PDF: The storage landscape is headed for dramatic change, thanks to new technologies like Fibre Channel over Ethernet (FCoE), pNFS, object-based storage and SAS that will affect everything from NAS and SANs to disk drives. Get the knowledge you need to make the most of your storage environment, now and in the future. »

HP StorageWorks EVA4400
Demo: Dont settle for an expensive and complex array that lacks functionality. The HP StorageWorks EVA4400 delivers virtual storage with enterprise class functionality at an affordable price. »

Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Events in JavaScript: An Inside Look

February 15,1999

Events are the glue which hold together the word inter-active. In learning to control and handle events you bridge the gap between a two-dimensional web page and a three-dimensional one; a web page which is one step closer to an application, offering the visitor opportunity to touch, feel, and mold the page rather than simply stare at it.

In this article we look closely at events, what they are, how to handle them with JavaScript, and how they differ -- in some cases significantly -- between the fourth generation versions of Netscape Navigator and Microsoft Internet Explorer. A follow up article will look at changes to events in the upcoming fifth generation browsers. This inside look at events requires at least a basic familiarity with JavaScript.

Event History

JavaScript was introduced to make it easier for web pages to "process"; that is, rather than merely display static information, JavaScript could be used to perform calculations, output results to the page, and so on. Typically, this power is best employed when triggered by the user who is, after all, the primary agent in a Web page. Events, then, became an essential tool for linking the user to the page.

A very simple example is a Click event. You may have written some JavaScript code which calculates a subtotal of purchase prices based on user selections. A key factor, though, is when does this code execute? A very basic question indeed. Logically, the code would execute when the user told it to, somehow. It is no great stretch to imagine a web page which sports a "Calculate Total" button. The calculation code, then, should be triggered when the user clicks the "Total" button.

Clicking the button, then, is an event. In fact, it is an event named "Click"! A whole category of events was defined based on actions that the user might take; for instance, the Change event will trigger when the user selects an item in a drop down menu (a select object) or the Submit event triggers when the user submits a form. Each event applies to certain elements on the page and some events could apply to multiple elements: the Change event only applies to a drop down menu but the Click event applies to a button and a hyperlink.

Not all events need be triggered by the user's actions, though. Some events, such as Load, are triggered by happenings within the browser itself; the latter, for instance, triggers when the Web page has completed downloading into the browser.

In all, a set of events was defined and applied to certain elements on the page. By the release of Netscape Navigator 3 and Internet Explorer 3 these events were well defined and implemented in JavaScript. The fourth generation release of the Big Two browsers introduced a deep rift, the approach and philosophy of events diverging in conceptually incompatible ways.

Now, then, we begin our look at using events with JavaScript in the fourth generation browsers. As indicated in the introduction, a follow up article shall focus on yet more enhancements to the event models in the soon-to-be-released fifth generation of Internet Explorer and Netscape Navigator.

Events in JavaScript: An Inside Look
The Document Object Model


Up to => Home / Authoring / JavaScript


Click Here


Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers