L
lasher168
Hi,
I have a problem which I have been on pondering all day and wasting
time !!!
I have a javascript call which looks like this
<td width="50%" class="inputLabel"><span class="mainTitle">Ship
To</span><input
name="sameasbillto" type="checkbox"
onclick="copyAddress(this.form);">
Same as Bill To
</td>
the javascript looks like this
function copyAddress() {
var form = document.forms[0];
alert("do i get here");
if (form == null) {
return;
}
alert("This is form "+form.fulfilment.value);
alert("This is form "+form.productName.value);
alert("This is element "+form.elements.length);
I cannot work out why I cannot get the length of the elements.
If I did this
alert("This is element "+form.elements.length);
the popup says this --> element [object]
If I typed this
alert("This is element "+form.elementname.value);
I get the correct answer.
All the above does not work in IE but works perfectly in firefox
Thanks
Chris
I have a problem which I have been on pondering all day and wasting
time !!!
I have a javascript call which looks like this
<td width="50%" class="inputLabel"><span class="mainTitle">Ship
To</span><input
name="sameasbillto" type="checkbox"
onclick="copyAddress(this.form);">
Same as Bill To
</td>
the javascript looks like this
function copyAddress() {
var form = document.forms[0];
alert("do i get here");
if (form == null) {
return;
}
alert("This is form "+form.fulfilment.value);
alert("This is form "+form.productName.value);
alert("This is element "+form.elements.length);
I cannot work out why I cannot get the length of the elements.
If I did this
alert("This is element "+form.elements.length);
the popup says this --> element [object]
If I typed this
alert("This is element "+form.elementname.value);
I get the correct answer.
All the above does not work in IE but works perfectly in firefox
Thanks
Chris