I need to write a javascript function. There are two fields “No of Items” and “Item ID”. “Item ID” has 5 input fields. If the field “No of Items” is chosen as 1, then “Item ID” needs 1 Id input. If the “No of Items” is 2, 2 ID inputs are needed and so on. Could anybody help me in writing this function please.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
“
<html lang=”en”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<meta name=”Content-Script-Type” content=”text/javascript”>
<meta name=”Content-Style-Type” content=”text/css”>
<title>Example</title>
</head>
<body>
<form action=”” onsubmit=”return check (this)”>
<h1>Item List</h1>
<p>
<label>No. of Items: <input name=”number” type=”text” size=”9″></label>
</p>
<p>
<label>Item ID:<input name=”itemid” type=”text” size=”10″>
<input name=”id1″ type=”text” size=”10″>
<input name=”id2″ type=”text” size=”10″>
<input name=”id3″ type=”text” size=”13″>
<input name=”id44″ type=”text” size=”11″></label></p>
</p>
<tr>
<td ALIGN=LEFT width=”222″> </td>
<td width=”218″> <input type=submit value=Submit> <INPUT type=reset value=”Clear Form”></td>
</tr>
</table>
</form>
</body>
</html>
Thanks