onfilterchange Event

MS Office DHTML, HTML & CSS

 
Click to return to the DHTML, HTML & CSS home page    
onerrorupdate Event     onfinish Event     DHTML Events    

onfilterchange Event


Fires when a visual filter changes state or completes a transition.

Syntax

Inline HTML<ELEMENT onfilterchange = "handler" ... >All platforms
Event propertyobject.onfilterchange = handlerJScript (compatible with ECMA 262 language specification) only
Named script<SCRIPT FOR = object EVENT = onfilterchange>Internet Explorer only

Remarks

BubblesNo
CancelsNo
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.

Event Object Properties

cancelBubbleSets or retrieves whether the current event should bubble up the hierarchy of event handlers.
srcElementRetrieves the object that fired the event.
srcFilterRetrieves the filter object that caused the onfilterchange event to fire.
typeRetrieves 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>

This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
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

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.