Enumerator | NN n/a IE 4(Win) ECMA n/a | |||
If an ActiveX control property or method returns a collection of values, the usual JavaScript approach to collections (treating them as arrays) does not work for such values. The Enumerator object gives JavaScript a way to reference items in such collections by controlling a pointer to the list of items. For additional details, visit http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsobjenumerator.asp. |
||||
Properties | ||||
None. |
||||
Methods | ||||
|
||||
Creating an Enumerator | ||||
var myEnumObj = new Enumerator(externalCollection);
|
atEnd( ) | NN n/a IE 4(Win) ECMA n/a |
Returns Boolean true if the Enumerator is pointing at the last item in the collection. |
|
Parameters | |
None. |
|
Returned Value | |
Boolean value: true | false. |
item( ) | NN n/a IE 4(Win) ECMA n/a |
Returns a value from the collection at the pointer's current position. |
|
Parameters | |
None. |
|
Returned Value | |
Number, string, or other value from the collection. |
moveFirst(), moveNext( ) | NN n/a IE 4(Win) ECMA n/a |
Adjust the location of the pointer within the collection, jumping to the first item in the collection, or ahead by one item. |
|
Parameters | |
None. |
|
Returned Value | |
None. |