January 6, 2000 - Cross-Browser Event Handler
January 6, 2000|
Cross-Browser Event Handler
Tips: January 2000
Yehuda Shiran, Ph.D.
Although Navigator 4.0x greatly expanded its set of elements that generate events, the selection is still much more limited. Not all elements can be the source of a mouse or keyboard event. For comparison, here's a list of the elements that support the onmouseup event handler in Navigator 4.0x:
Needless to say, there are only several elements that accept the
<P onClick="alert('This only works with Internet Explorer 4.0x.')"></P>
P element in Navigator 4.0x does not support any event handlers, so this definition does not work. In fact, you can find out for yourself by clicking these words, because we have specified an onclick event handler for this paragraph. The alert dialog box should pop up if you are running Internet Explorer 4.0x and up. Otherwise nothing occurs when you click the paragraph.
Learn more about the Cross-Browser Event Model from Column 11, The Cross-Browser Event Model.