Main Page

toElement

DOM Property/Method
IE Property/Method
clientY
clientY
ctrlKey
ctrlKey
currentTarget
-
detail
-
eventPhase
-
isChar
-
keyCode
keyCode
metaKey
-
pageX
-
pageX
-
preventDefault()
returnValue = false;
relatedTarget
fromElement
toElement
screenX
screenX
screenY
screenY
shiftKey
shiftKey
stopPropagation()
cancelBubble = true;
target
srcElement
timeStamp
-
type
type
To start, define a new method for
EventUtil
called
formatEvent()
, which accepts one parameter, the
event
object:
EventUtil.formatEvent = function (oEvent) {
return oEvent;
}
The first thing to do is check for IE on Windows using the browser detection script from the previous
chapter. In this case, you must check for the specific browser because this script is targeted at fixing a
problem only in IE on Windows:
EventUtil.formatEvent = function (oEvent) {
if (isIE && isWin) {
}
return oEvent;
};
295
All about Events
12_579088 ch09.qxd 3/28/05 11:39 AM Page 295


JavaScript EditorFree JavaScript Editor     Ajax Editor


©