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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looping through elements using VBScript function

Status
Not open for further replies.

DKL01

Programmer
Sep 14, 2000
233
US
Guys,

I'm not able to identify the problem with this code. Error is "Expected end of statement". Please help. Thanks

<script language=&quot;VBScript&quot; >
sub vbFunction()
dim iLoop
dim Temp
for iLoop = 1 to document.form1.elements.length
Temp = document.form1.elements[iLoop]
if Temp.checked = true then
'some processing
end if
next iLoop
end sub
</script> [sig][/sig]
 
for iLoop = 1 to document.form1.elements.length
Temp = document.form1.elements(iLoop)
if Temp.checked = true then
'some processing
end if
next -->
get rid of [red]iLoop[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top