Can someone please assist me with this issue? When I choose Business/Corporate from the dropdown menu, the table row becomes visible as expected. However, when I switch back to Residential/Consumer, the row does not hide. My goal is to only display the row when Business/Corporate is selected (allowing users to enter a business name) and hide it otherwise. Thank you for your help! :)
Here's my JavaScript code:
<script language="JavaScript">
function toggle(target)
{
if (target!="") {
obj=document.getElementById(target);
obj.style.display=( (obj.style.display=='none') ? '' : 'none');
}
}
</script>
This is my select option:
<select name="xaccttype" OnChange="toggle(this.value)">
<option value="Residential/Consumer">Residential/Consumer
<option value="Business/Corporate">Business/Corporate
</select>
And here is my table row:
<tr id="Business/Corporate" style="display:none"><td width="200" align="right"><b>Business Name:</b></td><td width="650"><input type="text" size="35" name="xbusinessname"></td></tr>