1 | <HTML>
|
---|
2 | <!-- This file is part of the HTML Reference Library ('HTMLib') -->
|
---|
3 | <!-- It should not be used outside of the HTMLib package -->
|
---|
4 | <!-- The HTMLib is © 1995-1998 Stephen Le Hunte -->
|
---|
5 | <!-- htmlib@htmlib.demon.co.uk -->
|
---|
6 | <HEAD>
|
---|
7 | <LINK REL="stylesheet" HREF="../style.css" TYPE="text/css">
|
---|
8 | <TITLE>The Filters collection</TITLE>
|
---|
9 | </HEAD>
|
---|
10 | <BODY TOPMARGIN="0" BGCOLOR="#FFFFE0" TEXT="#000000">
|
---|
11 |
|
---|
12 | <CENTER>
|
---|
13 | <SPAN CLASS="NSRtitle">The Filters Collection</SPAN>
|
---|
14 | </CENTER>
|
---|
15 |
|
---|
16 | <P><STRONG><EM>Note : </EM></STRONG>The Filters collection is only supported by <STRONG>Internet Explorer</STRONG> 4.0.
|
---|
17 |
|
---|
18 | <P>The Filters collection is an ordered, indexed array, containing a reference to all filter objects for a particular element. For information about the Visual Filters supported in <STRONG>Internet Explorer</STRONG> 4.0, see the <A HREF="../Dynamic_HTML/dfilt.htm" TITLE="View the Visual Filters topic">Visual Filters</A> topic.
|
---|
19 |
|
---|
20 | <P>Filter Objects can be retrieved by their index in the filters collection, or by the names by which they are applied to an element.
|
---|
21 |
|
---|
22 | <P>E.g.
|
---|
23 |
|
---|
24 | <SPAN CLASS="egcode">
|
---|
25 | <BLOCKQUOTE>
|
---|
26 | <CODE>MyImg.filters.transition.status
|
---|
27 | </CODE>
|
---|
28 | </BLOCKQUOTE>
|
---|
29 | </SPAN>
|
---|
30 |
|
---|
31 | <P>would return the current status of the 'transition' filter that has been applied to the element object referenced by 'MyImg'.
|
---|
32 |
|
---|
33 | <P><A NAME="properties"><STRONG>Properties</STRONG></A><BR>
|
---|
34 |
|
---|
35 | <P><SPAN CLASS="attr">length</SPAN><BR>
|
---|
36 | The <CODE>length</CODE> property returns the number of elements in the collection. Note that the <CODE>length</CODE> count starts at 1, not 0 as the filters collection index does. Therefore, the <CODE>length</CODE> property may return a value of 5, but to access the 3rd element, you'd need to use <CODE><EM>element</EM>.filters(2).<EM>property</EM></CODE>
|
---|
37 |
|
---|
38 | <P><A NAME="methods"><STRONG>Methods</STRONG></A>
|
---|
39 |
|
---|
40 | <P><SPAN CLASS="attr">item</SPAN><BR>
|
---|
41 | The <CODE>item</CODE> method retrieves single items, or sub-collections from the filters collection. It accepts the following arguments:
|
---|
42 |
|
---|
43 | <BLOCKQUOTE><EM>all</EM>.<STRONG>item</STRONG><EM>(index, sub-index)</EM>
|
---|
44 | </BLOCKQUOTE>
|
---|
45 |
|
---|
46 | <P>If <CODE>index</CODE> is a number, then the method returns a reference to the filter object at that position in the filter collections index, for the referenced element. I.e.
|
---|
47 |
|
---|
48 | <SPAN CLASS="egcode">
|
---|
49 | <BLOCKQUOTE>
|
---|
50 | <CODE>strTag=MyImg.filters.item(2).duration
|
---|
51 | </CODE>
|
---|
52 | </BLOCKQUOTE>
|
---|
53 | </SPAN>
|
---|
54 |
|
---|
55 | <P>would make <CODE>strTag</CODE> equal the value of the <CODE>duration</CODE> property of the 3rd filter applied to the element.
|
---|
56 |
|
---|
57 | <P>If the <CODE>index</CODE> property is a string value, then the <CODE>item</CODE> method returns a sub-collection, containing a reference to every filter attached to the element that has the same name as the value of the string that is the <CODE>index</CODE> argument. To retrieve certain element objects from this sub-collection, the <CODE>sub-index</CODE> argument must be used.
|
---|
58 |
|
---|
59 | <P>
|
---|
60 | <P ALIGN="right" CLASS="copyright">© 1995-1998, Stephen Le Hunte</P>
|
---|
61 | </BODY>
|
---|
62 | </HTML>
|
---|