Hello,
I came across a javascript that let's you hide fields depending on the answer from a drop down box. This works great, I was wondering if there is a way to turn the function into an array. I would like to implement it in my asp script
I think this is the code that would be an array, since the "position_other" is my variable in my aspcode
(I can make the "position_other" do "position_other1", "position_other2" and so on in my asp code
This is the whole code for the dropdown and hide field
I came across a javascript that let's you hide fields depending on the answer from a drop down box. This works great, I was wondering if there is a way to turn the function into an array. I would like to implement it in my asp script
I think this is the code that would be an array, since the "position_other" is my variable in my aspcode
(I can make the "position_other" do "position_other1", "position_other2" and so on in my asp code
Code:
document.getElementById('position_other').style.display="block";
}
else
{
document.getElementById('position_other').style.display="none";
This is the whole code for the dropdown and hide field
Code:
<script type="text/javascript">
function checkToShowFormField(ddObj)
{
if(ddObj.value=="Other")
{
document.getElementById('position_other').style.display="block";
}
else
{
document.getElementById('position_other').style.display="none";
}
}
</script>
<p> </p>
<table width="100%" border="0">
<tr>
<td width="28%"><select name="position" class="admindropdowns" id="position" onChange="checkToShowFormField(this);">
<option value="Manager">Manager</option>
<option value="Early Years Professional Deputy">Early
Years
Professional
Deputy</option>
<option value="Supervisor/Leader">Supervisor/Leader</option>
<option value="Assistant">Assistant</option>
<option value="Volunteer">Volunteer</option>
<option value="Apprentice">Apprentice</option>
<option value="Other">Other</option>
</select></td>
<td width="14%"><input name="position_other" type="text" class="admintextboxes" style="display:none;" id="position_other" value="" /></td>
</div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><div align="left"></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><div align="left"></div></td>
</tr>
</table>
<p>
</p>