Hello,
I have begun working with ajax recently to populate a drop down in a
form, where prviously the whole page would have to reload. Works great.
Where the form originally had a standard drop down like this:
<Select Method="Shippin gMethod">
<option>method1 </option>
<option>method2 </option>
<option>method3 </option>
</Select>
It now pulls form an external page and ajax uses
document.getEle mentById('myspa n').innerHTML = result;
and puts it here inside my form:
<form name="form1">
(stuff snipped)
<span name="myspan" id="myspan"></span>
</form>
All works well in that the form posts properly.
However, previously there was the following javascript to trigger a
function when the <Select Method="Shiping Method"was changed:
<script language="JavaS cript" type="text/JavaScript">
document.getEle mentsByName("Sh ippingMethod")[0].onchange=total ;
</SCRIPT>
This now results in an error:
document.form1. ShippingMethod is null or not an object
What do I do about that?
I have begun working with ajax recently to populate a drop down in a
form, where prviously the whole page would have to reload. Works great.
Where the form originally had a standard drop down like this:
<Select Method="Shippin gMethod">
<option>method1 </option>
<option>method2 </option>
<option>method3 </option>
</Select>
It now pulls form an external page and ajax uses
document.getEle mentById('myspa n').innerHTML = result;
and puts it here inside my form:
<form name="form1">
(stuff snipped)
<span name="myspan" id="myspan"></span>
</form>
All works well in that the form posts properly.
However, previously there was the following javascript to trigger a
function when the <Select Method="Shiping Method"was changed:
<script language="JavaS cript" type="text/JavaScript">
document.getEle mentsByName("Sh ippingMethod")[0].onchange=total ;
</SCRIPT>
This now results in an error:
document.form1. ShippingMethod is null or not an object
What do I do about that?
Comment