PDA

View Full Version : Onchange without sumitting a form name?


ClueLess
11-13-2002, 04:22 PM
How can we do an onChange event without submitting a form name?

The code below is working. But, it affects something else on the form. How can we do that? Thanks for helping


<html>
<head>
<title>Untitled</title>
</head>

<body>

<form action="showbillinginfo.asp" name="SubmitForm" method="post" onsubmit="ShowAmendmentDate()">

<table border="0" cellpadding="1" cellspacing="1">

<tr>
<td class="smallHeadingBurg" align="right">]Selected Payment Plan:</td>
<td>&nbsp;
<script language="javascript">
function changeValue(){
document.SubmitForm.submit();
}
</script>
<select style="border:1 solid #000000" name="BillPlan" ID="BillPlan" onchange="changeValue()">
<OPTION selected > MONTHLY </OPTION>

<OPTION > MONTHLY EFT </OPTION>
</select>
</td>
</tr>
<%if Request.Form("BillPlan") = "MONTHLY EFT" then %>
'show billing info.
<%end if %>
</table>
</form>

</body>
</html>

beetle
11-13-2002, 04:46 PM
Is this what you are asking for?

<script language="javascript">
function changeValue(f){
f.submit();
}
</script>
<select style="border:1 solid #000000" name="BillPlan" ID="BillPlan" onchange="changeValue(this.form)">

If so, you can ditch the function and just do

<select style="border:1 solid #000000" name="BillPlan" ID="BillPlan" onchange="this.form.submit();">