Forum Moderators: open
<b>Type of Organization</b><IMG SRC="/images/Navigation/art/LittleR.gif"><br>
<select name="sarepcom">
<option value="Church">Church
<option value="Synagogue">Synagogue
<option value="School">School
<option value="Zoo">Zoo
<option value="Caterer">Caterer
<option value="Restaurant">Restaurant
<option value="Party Planner">Party Planner
<option value="Hotel Organization">Hotel Organization
<option value="Community Center">Community Center
<option value="Corporation">Corporation
<option value="">Other
</select><br><br>
If you chose Other, please specify<br>
<input type="Text" name="sarepcom" size="35" maxlength="80" VALUE=""></INPUT>
What do I need to do?
I'd change the name of the second field and use some script language to evaluate the form results. If the first field is set to 'other', then get the value of the 2nd field, otherwise ignore it.
Also, your code shows you're stuck halfway between an input field which doesn't have a closing tag and a textarea which does. Learn more here: [w3.org...]
function FillInCompType() {
document.addrform.sarepcom.value = document.addrform.comptype1.value
}
<b>Type of Organization</b><IMG SRC="/images/Navigation/art/LittleR.gif"><br>
<select name="comptype1" onChange="FillInCompType()">
<option value="" selected>Select one
<option value="Church">Church
<option value="Synagogue">Synagogue
<option value="School">School
<option value="Zoo">Zoo
<option value="Caterer">Caterer
<option value="Restaurant">Restaurant
<option value="Party Planner">Party Planner
<option value="Hotel Organization">Hotel Organization
<option value="Community Center">Community Center
<option value="Corporation">Corporation
</select><br>
Value chosen above, or enter another value if not listed.<br>
<input type="Text" name="sarepcom" size="35" maxlength="80" VALUE="">
It was too difficult to program the CGI program to handel two values when it expects only 1.
myVar = request.form("valueA")
if myVar = "other" then myVar = request.form("valueB")
Surely its not hard to write something similar in cgi or whatever?