340Part IIIDocument Objects Referencefalse. See the discussion of (Dedicated web hosting)
Thursday, January 10th, 2008340Part IIIDocument Objects Referencefalse. See the discussion of the ondragevent handler earlier in this chapter for more detailson the sequence of drag-related events. ExampleSee Listing 15-37 of the ondragevent handler to see how to apply the ondropevent handlerin a typical drag-and-drop scenario. Related Items:event.dataTransferobject; ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstartevent handlers. onfilterchangeCompatibility:WinIE4+, MacIE-, NN-, Moz-, Safari- The onfilterchangeevent fires whenever an object s visual filter switches to a new state or atransition completes (a transition may be extended over time). Only objects that accommodatefilters and transitions in IE (primarily block elements and form controls) receive the event. A common usage of the onfilterchangeevent is to trigger the next transition within asequence of transition activities. This may include an infinite loop transition, for which theobject receiving the event toggles between two transition states. If you don t want to get intoa loop of that kind, place the different sets of content into their own positionable elementsand use the onfilterchangeevent handler in one to trigger the transition in the other. ExampleListing 15-39 demonstrates how the onfilterchangeevent handler can trigger a secondtransition effect after another one completes. The onloadevent handler triggers the firsteffect. Although the onfilterchangeevent handler works with most of the same objects inIE4 as IE5, the filter object transition properties are not reflected in a convenient form. Thesyntax shown in Listing 15-39 uses the new ActiveX filter control found in IE5.5+ (described inChapter 30). Listing 15-39: Using the onFilterChange Event Handler
ondragenter and ondragleave Event Handlers
Select any character(s) from this paragraph, and slowly drag it aroundthe page. When the dragging action enters the large header above, thestatus bar displays when the onDragEnter event handler fires. When youleave the header, the message is cleared via the onDragLeave eventhandler.
Related Items:ondrag, ondragend, ondragstart, ondropevent handlers. ondragstart(See ondrag) ondropCompatibility:WinIE5+, MacIE-, NN-, Moz-, Safari- The ondropevent fires on the drop target element as soon as the user releases the mouse but- ton at the end of a drag-and-drop operation. Microsoft recommends that you denote a drop target by applying the ondragenter, ondragover, and ondropevent handlers to the target ele- ment. In each of those event handlers, you should set the dataTransfer.dropEffectto thetransfer effect you wish to portray in the drag-and-drop operation (signified by a different cur- sor for each type). These settings should match the dataTransfer.effectAllowedpropertythat is usually set in the ondragstartevent handler. Each of the three drop-related handlersshould also override the default event behavior by setting the event.returnValueproperty toelementObject.ondrop