Stepping thru a DO or FOR in a HTA

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 182
Joined: Fri Jan 30, 2009 12:37 am

Stepping thru a DO or FOR in a HTA

Post by rasimmer » Thu Apr 16, 2009 5:35 am

In VBScript, say you did a ADO search of Active Directory and found everyone that didn't have a field filled in, we'll say for an example I get 10 results back. I could simply place a Inputbox or MsgBox in the middle of the DO or FOR to gather information and the script would pause for user input. How would I emulate this in an HTA? Say, I wanted to display the CN, DisplayName, and their email address but the description was blank, so I want my interface to display a textbox and ask for a description for the user. Suggestions? I can write you a simple example of this using anything, like if you wanted to use Win32_Process and step thru each process. Thanks. rasimmer2009-04-16 12:36:07

Posts: 14136
Joined: Tue May 22, 2007 9:57 am

Stepping thru a DO or FOR in a HTA

Post by jvierra » Thu Apr 16, 2009 5:48 am

Now you are really getting into trouble.

REmember that HTML web pages are "stateless" which means that there is no concept of linear processing to step through. A page is rendered and then it ia available as a whole.

You can cause an event to be triggered as a result of some input...say a button click or a n update of a control. This can be used to display sequential input boxes and gather incremental input.

I suggest that what you are asking needs to be reconsidered to address the technology that you want to use. Is it worth all of teh extra codeing headache to approach the solution in this way.

Page validation is what is normally used in place of incremental prompting.