www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
 onfilterchange Event
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 only
object.onfilterchange = GetRef("handler")Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onfilterchange> Internet Explorer only

Event Information

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, a handler can query the event object for the following event properties.

Available Properties

altKey Sets or retrieves a value that indicates the state of the ALT key.
altLeft Sets or retrieves a value that indicates the state of the left ALT key.
cancelBubble Sets or retrieves whether the current event should bubble up the hierarchy of event handlers.
ctrlLeft Sets or retrieves the state of the left CTRL key.
shiftLeft Retrieves the state of the left SHIFT key.
srcElement Sets or retrieves the object that fired the event.
srcFilter Sets or retrieves the filter object that caused the onfilterchange event to fire.
type Sets or 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.

<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 Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this event.

Applies To

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
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG