Hi,
I am trying to display a number of text boxes and drop down menus using a For Loop.
I can only display one of each time I select any number from the drop down menu.
Currently the For loop is commented out, but if I leave it there nothing happens at all. I don't understand why its not working with the For loop.
Many Thanks.
<html>
<head>
<title>Form</title>
<script type="text/javascript" >
function gm(guests)
//var i=0;
//for (i=0;i=15;i++);
{
var creategm = document.getElementById("creategm");
creategm.innerHTML = creategm.innerHTML +"<h4>Name</h4><input type=text name='guestname'/><br/><h4>Menu</h4>Starters<SELECT size='3'><OPTION value='Cheese...'>Cheese...</OPTION><OPTION value='Food...'>Food...</OPTION><OPTION value='Other....'>Other...</OPTION></SELECT><br/>Main<SELECT size='4'><OPTION value='food....'>food....</OPTION><OPTION value='food....'>food..</OPTION><OPTION value='foood....'>foood....</OPTION><OPTION value='....'>....</OPTION></SELECT><br/>Course 3<SELECT size='3'><OPTION value='desert'>desert</OPTION><OPTION value='other'>other</OPTION><OPTION value='pudding'>pudding</OPTION></SELECT><br/>refreshments<SELECT size='2'><OPTION value='tea'>tea</OPTION></SELECT>"
}
</script>
</head>
<body>
<form action='' method='post' id='orderf'>
<label for="tickno">Ticket Number</label>
<select id="tickno" name="tickno" class="dropdownlist" onChange="gm(this.value);" tabindex="9">
<option>Please select</option>
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
<option value="4"> 4 </option>
<option value="5"> 5 </option>
<option value="6"> 6 </option>
<option value="7"> 7 </option>
<option value="8"> 8 </option>
<option value="9"> 9 </option>
<option value="10"> 10 </option>
</select><br/><br/>
<b> Enter Names and information below</b> <br/>
</p>
<div id="creategm"></div>
<p class="no-border">
<input class="button" type="submit" value="Submit" tabindex="10"/>
<input class="button" type="reset" value="Reset" tabindex="11"/>
</p>
</form>
</body>
<html>