CalOtt
11-17-2010, 08:35 PM
I want to have several forms on one page that are not displayed until a selection is made from the category drop down box(select element). The form displayed will depend on the selection made. Here is the code I have so far. Please help.
<body>
<label id="Label1">ADMINISTRATOR CONSOLE - ADD AND EDIT ASSETS<br />
</label>
<form action="" method="post" style="border-style: ridge; width: 311px; height: 37px;" name="myform">
<table>
<tr>
<td>Select Category:</td><td>
<select name="category" onchange="set_sub_category()" style="width: 157px">
<option selected="selected" value="select">Select an Option</option>
<option value="add">Add Category</option>
<option value="district">Council District</option>
<option value="region">Region</option>
<option value="pom">POM</option>
<option value="proptype">Property Type</option>
<option value="assetcat">Asset Category</option>
<option value="assettype">Asset Type</option>
<option value="property">Property</option>
<option value="asset">Asset</option>
</select>
</td>
</tr>
</table>
</form>
<form style="display:none" action= "admin_console_new.html" onsubmit="return (validate_form(this)& validate_list(this))" method="post" style="border-style: ridge; border-width: medium; height: 154px; width: 346px;" name="district">
<table style="height: 86px">
<tr>
<td>Select District Value:</td><td>
<select name="district">
<option selected="selected">Select an Option</option>
<option>Add Council District</option>
</select>
</td>
</tr><tr>
<td>Enter District Name:</td><td>
<input name="name" type="text"/>
</td>
</tr><tr>
<td>Enter Description:</td><td><textarea name="description"></textarea>
</td>
</tr><tr>
<td><input type="submit" value="Submit" name="Submit3" /><input type="reset" value="Reset" />
</td>
</tr>
</table>
</form>
<body>
<label id="Label1">ADMINISTRATOR CONSOLE - ADD AND EDIT ASSETS<br />
</label>
<form action="" method="post" style="border-style: ridge; width: 311px; height: 37px;" name="myform">
<table>
<tr>
<td>Select Category:</td><td>
<select name="category" onchange="set_sub_category()" style="width: 157px">
<option selected="selected" value="select">Select an Option</option>
<option value="add">Add Category</option>
<option value="district">Council District</option>
<option value="region">Region</option>
<option value="pom">POM</option>
<option value="proptype">Property Type</option>
<option value="assetcat">Asset Category</option>
<option value="assettype">Asset Type</option>
<option value="property">Property</option>
<option value="asset">Asset</option>
</select>
</td>
</tr>
</table>
</form>
<form style="display:none" action= "admin_console_new.html" onsubmit="return (validate_form(this)& validate_list(this))" method="post" style="border-style: ridge; border-width: medium; height: 154px; width: 346px;" name="district">
<table style="height: 86px">
<tr>
<td>Select District Value:</td><td>
<select name="district">
<option selected="selected">Select an Option</option>
<option>Add Council District</option>
</select>
</td>
</tr><tr>
<td>Enter District Name:</td><td>
<input name="name" type="text"/>
</td>
</tr><tr>
<td>Enter Description:</td><td><textarea name="description"></textarea>
</td>
</tr><tr>
<td><input type="submit" value="Submit" name="Submit3" /><input type="reset" value="Reset" />
</td>
</tr>
</table>
</form>