|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Does anyone know how to get the number of input tags contained in a div tag? I am trying to build a dynamic list of checkboxes from a database and I don't know how many checkboxes i have until the form is built to do some validation.
Probably using client-side javascript - something like var obj = document.all.tags("div").item(0) var mydiv = obj.id.indexOf("chk0100") But I am not sure how to specify the name of the input tag. I dont know what the above statement does. Thanks ![]() |
|
#2
|
||||
|
||||
|
well i hope this gets you started, i'm asuming that you are posting in the asp forum so you have that at your disposal.
Code:
<%for each THING in request.form response.write THING &"="& request.form(THING) & "<br>" next%> |
|
#3
|
|||
|
|||
|
this would be better posted in the JavaScript section. if you are building the list from a database then you should know how many check boxes will be need. simple write that to a hidden field and use that in your javascript. if you know where to start and how long to go for then it should be fairly easy.
__________________
Programmer's Corner |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > how to get number of input elements? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|