View Full Version : dynamically create table rows onChange of select drop-down menu

08-18-2005, 02:10 PM
I have this form setup, is there a way that i can have
a drop down menu with values 1-15 that will change the value of
a when changed and create the correct number of table rows?

<form name="form">
<tr><td><font class="font_heading">Mini Rules Administration</font></td></tr>
<% for a = 1 to 6 %>
<td><font class="font">Rule Heading</font></td>
<td><input type="text" name="mini_heading" size="10" maxlength="1000"></td>
<td><font class="font">Rule Content</font></td>
<td><input type="text" name="mini_content" size="10" maxlength="1000"></td>
<% next %>

08-18-2005, 04:36 PM
I am not sure that I understand where the values in the drop down are coming from. Are they from a database table? Is the number of a determined by the number of results returned from a query on a database? Or is this determined some other way? You need to be more specific if you want some help.

08-18-2005, 04:54 PM
Are you wanting this to happen as soon as the number is selected or with a form submit?
If you're using a form submit just replace a with request.form("nameofdropdown")

If you want it to happen automatically you'll need to use javascript to either rewrite the page or submit the form then you can carry on as above