The information in this article applies to:
SUMMARYIn some cases, you may find it convenient to loop through a large number of script objects created by Design-Time Controls (DTCs). Although you cannot index these objects in an array, you can use the JavaScript eval function directly or indirectly to achieve the same result. This article demonstrates how you can loop through the script objects using JavaScript. MORE INFORMATIONThe following code constructs the three textbox script objects in a loop and then initializes them in a loop. (You may find it easier to convert a Textbox DTC to runtime text permanently first and customize its runtime code.)
The following code segment clears the three textboxes in a loop:
Since eval is a JavaScript intrinsic function and not available in
VBScript, you will have to use it indirectly if you are programming in
VBScript. To clear the three textboxes in a loop in VBScript, you may use
the following code, which introduces an additional function evalit:
This is similar to the sample given in JavaScript, except the VBScript code
calls the eval method indirectly by calling the JavaScript function evalit.
Keywords : kbJScript kbScript kbVisID600 kbGrpASP |
Last Reviewed: May 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |