Archive for December, 2007

777Chapter 25Event ObjectsIf an event is cancelable, then (Medical web site)

Monday, December 31st, 2007

777Chapter 25Event ObjectsIf an event is cancelable, then its default action can be prevented from occurring with thehelp of a script. While most events are cancelable, some are not. The cancelable property letsyou inquire about a particular event object to see if its event type is cancelable. Values forthe property are Booleans. You may want to perform special operations only on events thatare cancelable and handle the others without special treatment. For this branch, you can usethe property in an ifcondition statement: if (evt.cancelable) { // special processing for cancelable events} You do not have to branch, however, just to prevent an event s default action. A non- cancelable event doesn t mind if you tell it to prevent the default action. Related Items:preventDefault()method. cancelBubbleValue:Boolean.Read/WriteCompatibility:WinIE4+, MacIE4+, NN6+, Moz1+, Safari1+ The cancelBubbleproperty is a rare instance of an IE4+ event property being implementedin NN6+/Moz/Safari even though the property is not defined in the W3C DOM. The propertyoperates the same as in IE4+ in that it determines whether the current event object bubblesup any higher in the element containment hierarchy of the document. By default, this prop- erty is false, meaning that if the event is supposed to bubble, it will do so automatically. To prevent event bubbling for the current event, set the property to trueanywhere withinthe event handler function. As an alternative, you can cancel bubbling directly in an element sevent handler attribute, as in the following: onclick= doButtonClick(this); event.cancelBubble = true Cancelling event bubbling works only for the current event. The very next event to fire willhave bubbling enabled (provided the event bubbles). If you are trying to migrate your code as much as possible to the W3C DOM, use thestopPropagation()method instead of cancelBubble. For cross-browser compatibility, however, cancelBubbleis a safe bet. ExampleSee Listing 25-6 to see the cancelBubbleproperty in action in an IE environment. Eventhough that listing has some features that apply to WinIE5.5+, the bubble cancelling demon- stration works all the way back to IE4. Related Items:stopPropagation()method. charCodekeyCodeValue:Integer.Read-OnlyCompatibility:WinIE-, MacIE-, NN6+, Moz1+, Safari1+ The W3C DOM event object model clearly distinguishes between the Unicode characterattached to the alphanumeric keys of the keyboard and the code attached to each of thekeyboard keys (regardless of its character). To inspect the character of a key, use the(NN6/Moz/Safari) eventObject.charCode
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

776Part IIIDocument Objects (Web host) ReferenceExampleSee Listing 25-10, where the

Monday, December 31st, 2007

Web design careers - 775Chapter 25Event Objectsbetween the IE4+ and W3C DOM

Sunday, December 30th, 2007

Web design programs - 774Part IIIDocument Objects ReferencePropertiesMethodsEvent HandlerscurrentTargetdetaileventPhaseisCharkeyCodelayerXlayerYmetaKeyoriginalTargetpageXpageYrelatedTargetscreenXscreenYshiftKe targettimeStamptypeviewSyntaxAccessing NN6+ event

Sunday, December 30th, 2007

773Chapter 25Event ObjectsYou can (Web server type) find out what kind

Saturday, December 29th, 2007

772Part IIIDocument Objects ReferenceListing 25-17(continued) srcElement Property One (Web design company)

Saturday, December 29th, 2007

Web hosting india - 771Chapter 25Event ObjectsThe srcElementproperty is a reference to

Friday, December 28th, 2007

770Part IIIDocument Objects ReferencereturnValueValue:Boolean.Read-OnlyCompatibility:WinIE4+, MacIE4+, NN-, (Web hosting rating) Moz-, Safari-

Friday, December 28th, 2007

769Chapter 25Event Objects4.Poke around with other non-character (Adelphia web hosting) keys.

Thursday, December 27th, 2007

Web hosting rating - 768Part IIIDocument Objects ReferenceListing 25-16(continued) function clearEm() {

Thursday, December 27th, 2007