Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enumerate Controls in HTA? 1

Status
Not open for further replies.

VulcanJedi

Technical User
Oct 2, 2002
430
US
Can u do this?
enumerate through a collection of the controls on an HTA?

For ex: I'd liek to enumerate controls and deselect all the checkboxes w/ a Button vs having to code a deslect statemnt manually for each control and haveing to manually update this?

[yinyang] Tranpkp [pc2]
 
Targetting to a more specific type of controls, such as certain subset input controls (text, button, checkbox etc), you can use more specific method to enhance efficiency.
[tt]
dim cobj,obj
set cobj=document.getElementsByTagName("input")
for each obj in cobj
if strcomp(obj.type,"checkbox",1)=0 then
'you've found one checkbox control with the referenc obj
end if
next
[/tt]
For more general case, the idea is the same.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top