Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
[1] Suppose the form tag is of the bare structure like this.
[tt]
<form name="x" id="y" action="etc" method="etcetc">
<!-- field elements inside -->
</form>
[/tt]
[2] The handling and the reference to the form and field elements is done in a vbs function/sub (doesn't matter) like this.
[tt]
sub somehandler
dim oform,celem,i
set oform=document.forms("x")
[green]'or alternative
'set oform=document.getElementById("y")[/green]
set celem=oform.elements
for i=0 to celem.length
if celem(i).type="checkbox" then
msgbox "checkbox info" & vbcrlf & vbcrlf & _
"name: " & vbtab & vbtab & celem(i).name & vbcrlf & _
"id:" & vbtab & vbtab & celem(i).id & vbcrlf & _
"checked?:" & vbtab & vbtab & celem(i).checked & vbcrlf & _
"value:" & vbtab & vbtab & celem(i).value & vbcrlf & _
"outerHTML:" & vbtab & celem(i).outerHTML
[blue]'based on your criteria, you do thing about it hereon
'its reference is now found and is identified as celem(i)[/blue]
end if
next
set celem=nothing
set oform=nothing
end sub
[/tt]
ps The msgbox is just intended to show you what the handler has found. You can spare it and go directly for the real stuff to perform on the checkbox found.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.