DHTML Events
Fires when a visual filter changes state or completes a transition.
Inline HTML |
<element onfilterchange = "handler" ... > |
All platforms |
Event property |
object.onfilterchange = handler |
ECMA-262 Language Specification |
Named script |
<script FOR=object EVENT=onfilterchange> |
Internet Explorer® only |
Bubbles |
Yes |
Cancels |
No |
To invoke |
Change the filter state. |
Default action |
Signals that the filter on an object has changed state. |
While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.
Event Object Properties
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. |
The example demonstrates the onfilterchange event.
Sample Code
<html>
<head>
<title>CSS Controls Samples</title>
</head>
<body>
<h2>Some text filters, and at its completion,
an image will filter 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="../,,/shared/samp01.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>
BDO, BODY, BUTTON, DIV, FIELDSET, HTMLAREA, IMG, INPUT, MARQUEE, NEXTID, RB, RT, RUBY, SPAN, TABLE, TD, TEXTAREA, TH, TR