onfilterchange Event
Fires when a visual filter changes state or completes a transition.
Syntax
Inline HTML <ELEMENT onfilterchange = "handler" ... > All platforms Event property object.onfilterchange = handler JScript (compatible with ECMA 262 language specification) only Named script <SCRIPT FOR = object EVENT = onfilterchange> Internet Explorer only
Remarks
Bubbles No Cancels No To invoke Change the filter state. Default action Signals that the filter on an object has changed state.
Event Object Properties
Although event handlers in the DHTML Object Model do not receive parameters directly, the handler can query the event object for data.
cancelBubble Sets or retrieves whether the current event should bubble up the hierarchy of event handlers. srcElement Retrieves the object that fired the event. srcFilter Retrieves the filter object that caused the onfilterchange event to fire. type Retrieves the event name from the event object.
Example
This example uses the onfilterchange event to trigger a filter effect. When the page loads, the block of text is erased using a checkerboard-down transition. Once the checkerboard transition is complete, the image is made visible using a box-in transition.
Sample Code
<HTML> <HEAD> <TITLE>Microsoft Cascading Style Sheet Controls Samples</TITLE> </HEAD> <body> <h2>Some text filters out (checkerboard), and at its completion an image filters in (box-in). Refresh repeats.</h2> <Div ID="TextRegion" STYLE="Position: absolute; border: solid red; background-color: lightblue; LEFT: 0; TOP: 100; WIDTH: 100%; VISIBILITY: visible; FILTER: revealTrans(Transition = 11, Duration = 1.25)"> Text that will filter upon pageload.<br> Text that will filter upon pageload.<br> Text that will filter upon pageload.<br> Text that will filter upon pageload.<br> Text that will filter upon pageload.<br> Text that will filter upon pageload.<br> Text that will filter upon pageload. </DIV> <DIV ID="ImageRegion" STYLE="Position: absolute; border: solid red; LEFT: 0; TOP: 100; WIDTH: 30%; VISIBILITY: hidden; FILTER: revealTrans(Transition = 0, Duration = 1.25)"> <IMAGE id=image1 SRC="/workshop/samples/author/graphics/dhtml/blupan.gif"> </DIV> <SCRIPT LANGUAGE=VBScript> Sub Window_onload Call TextRegion.filters.revealTrans.Apply () Call ImageRegion.filters.revealTrans.Apply() Call Start End Sub Sub Start TextRegion.style.visibility = "hidden" ImageRegion.style.visibility = "visible" Call TextRegion.filters.revealTrans.Play() End Sub Sub TextRegion_onfilterchange if TextRegion.filters.revealTrans.Status = 0 then Call ImageRegion.filters.revealTrans.Play(1.5) End If End Sub </SCRIPT> </BODY> </HTML>
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. BDO, BODY, BUTTON, custom, DIV, FIELDSET, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, MARQUEE, NEXTID, RT, RUBY, SPAN, TABLE, TD, TEXTAREA, TH, TR
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.