ClueLess
11-18-2002, 03:44 PM
I have a dropdown box; it has 1. Payment, 2.Payment –two,3.Payment-three, 4.Full-Payement. If user chooses on 4.Full-Paymenet, it shows a banking table. To do that, I have an hidden table and onchange function
I got an error, it keeps saying that. “Error: ‘document.all.BillPlan.selectedIndex’ is null or not an object.
I know, the onchange function is correct. It works fine. BUT, how can I fix the hidden table? Thanks for your help.
<form action="BillingEdit.asp" name="SubmitForm" method="post" onsubmit="ShowDate()">
<table border="0" cellpadding="1" cellspacing="1">
<td>
<script language="javascript">
function changeValue()
{
if (document.all.BillPlan.selectedIndex == 4)
{
document.all.showbankinfo.style.display = ''
}
else
{
document.all.showbankinfo.style.display = 'none'
}
}
</script>
<select style="border:1 solid #000000" name="BillPlan" ID="BillPlan" onchange="changeValue()">
<option>1. Payment </option>
<option> 2.Payment –two</option>
<option> 3.Payment-three</option>
<option> 4.Full-Payement </option>
</select>
</td>
</tr>
<tr>
<td>
<table id="showbankinfo" name="showbankinfo" border="0" cellpadding="1" cellspacing="1">
<!---banking table--->
</table>
</td>
</tr>
<script language="javascript">
// function showtable(){
//document.SubmitForm.submit();
//alert(document.all.BillPlan.selectedIndex);
if (document.all.BillPlan.selectedIndex == 4)
{
document.all.showbankinfo.style.display = ''; //show form's field
}
else
{
document.all.showbankinfo.style.display = 'none'; //hidden
}
// }
</script>
</table>
</form>
I got an error, it keeps saying that. “Error: ‘document.all.BillPlan.selectedIndex’ is null or not an object.
I know, the onchange function is correct. It works fine. BUT, how can I fix the hidden table? Thanks for your help.
<form action="BillingEdit.asp" name="SubmitForm" method="post" onsubmit="ShowDate()">
<table border="0" cellpadding="1" cellspacing="1">
<td>
<script language="javascript">
function changeValue()
{
if (document.all.BillPlan.selectedIndex == 4)
{
document.all.showbankinfo.style.display = ''
}
else
{
document.all.showbankinfo.style.display = 'none'
}
}
</script>
<select style="border:1 solid #000000" name="BillPlan" ID="BillPlan" onchange="changeValue()">
<option>1. Payment </option>
<option> 2.Payment –two</option>
<option> 3.Payment-three</option>
<option> 4.Full-Payement </option>
</select>
</td>
</tr>
<tr>
<td>
<table id="showbankinfo" name="showbankinfo" border="0" cellpadding="1" cellspacing="1">
<!---banking table--->
</table>
</td>
</tr>
<script language="javascript">
// function showtable(){
//document.SubmitForm.submit();
//alert(document.all.BillPlan.selectedIndex);
if (document.all.BillPlan.selectedIndex == 4)
{
document.all.showbankinfo.style.display = ''; //show form's field
}
else
{
document.all.showbankinfo.style.display = 'none'; //hidden
}
// }
</script>
</table>
</form>