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

Discussion in 'Javascript' started by pizzy, Mar 23, 2005.

  1. pizzy

    pizzy Guest

    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!
     
    pizzy, Mar 23, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Eshtry
    Replies:
    0
    Views:
    647
    Andy Eshtry
    Mar 1, 2004
  2. Andy Eshtry
    Replies:
    0
    Views:
    341
    Andy Eshtry
    Mar 1, 2004
  3. Andy Eshtry
    Replies:
    0
    Views:
    187
    Andy Eshtry
    Mar 1, 2004
  4. pizzy
    Replies:
    4
    Views:
    156
    pizzy
    Mar 18, 2005
  5. pizzy
    Replies:
    5
    Views:
    409
    pizzy
    Apr 12, 2005
Loading...

Share This Page