[thelist] Dynamically changing a form

dante dante at vianet.net.au
Tue Jul 17 02:29:25 CDT 2001


G'Day,
            I've been trying to create a form that changes depending on the
data entered.
What I've trying to achieve is:
    -    When a number value (between 1 & 10) is entered into the text input
author.
    -    The table containing the author's first, middle & last names is
repeated to that
         value.
    -    A number is generated for each repeat indicating the order that it
is created.
          in & appended to the input text name for each of the author's
first, middle & last names.

Would a second form be required for each iteration of the author name table?


<tr>
     <td># of Authors:</td>
     <td><input type="text" name="author" size="5" maxlength="10" value="1"
onBlur=""></td>
</tr>

<tr>
     <td></td>
     <td>
            <!-- REPEAT TIMES (# OF AUTHORS) -->
                <!-- AUTHOR TABLE -->
                <table align="center">
                    <input type="hidden" name="order_number" value="#">
                    <tr>
                        <td>First Name:</td><td><input type="text"
name="first_name_#" size="30" value=""></td>
                    </tr>
                    <tr>
                        <td>Middle Name:</td><td><input type="text"
name="middle_name_#" size="30" value=""></td>
                    </tr>
                    <tr>
                        <td>Last Name:</td><td><input type="text"
name="last_name_#" size="30" value=""></td>
                    </tr>
                </table>
                <!-- END AUTHOR TABLE -->
            <!-- END REPEAT -->
    </td>
</tr>



Thanks,
            dante
            dante at vianet.net.au
            www.vianet.net.au/~dante






More information about the thelist mailing list