How to have a nested dynamic checkbox inside my dynamic form.

P

pizzy

Scripting Friends,

I am wondering if it's possible to nest a dynamic checkbox inside my
dynamic form.


READ: THE FORM BELOW IS A GENERIC FORM THAT CALLS THE FUNCTION
________
enter # of input0A |_______| [submit] [reset]


------------------------------­­-------------------------
READ: THE FORM BELOW IS AFTER 2 IS ENTERED INTO THE input ABOVE


________
input1A |_______| [] check here to add input2A and input3A
________
input1B |_______| [] check here to add input2B and input3B


[submit] [reset]


------------------------------­­-------------------------
READ: THE FORM BELOW IS THE RESULTS OF CLICKING THE FIRST
CHECKBOX ABOVE
________ ________ ________
input1A |_______| [] input2A |_______| input3A |_______|
________
input1B |_______| [] check here to add input2B and input3B


[submit] [reset]


function showInputs() {
var howMany = document.form1.number_of_field­s.value;
inter = "'";
data = "";
if (howMany < 16 && howMany > -1) {
for (i=1; i <= howMany; i++) {
data = data + " <input type='text' size=10 name=" + inter+
"inputMe[]" + i + inter + "'>" + " <input type='checkbox'
onClick='showInputs2();' id='tag_1' name='checkMe'" + i + "'><br>";
}
field1.innerHTML = data;
}else {
window.alert("Please select up to 15 entries.");
}
}
//This all goes into a div tag. but I want the check boxes in
// here to run show and hide some more input boxes.
<form>
<div id="field1" style="possitive:absolute"></d­iv>
</form>


Anyone that can help me understand how to do this will be greatly
appreciated. Thanks for checking it out!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top