A
AC
This code works great the first few times it is used in a form and then I
get the error:
'QUANTITY.value' is null or not an object in IE6.
The names used are generated on the server so it is not code that changes
due to being handwritten. I can't see any reason why this does work at
first then fails after a few uses. It is weird that it works perfectly but
after a few attempts it stops working.
**THE CALLER:
note there are some hidden fields but they are not used in this code.
====================================
<tr>
<FORM NAME='frmOrder39ea'>
<td width='50' valign='middle' align='center'><font size=-1>
<input type='text' size='3' name='QUANTITY' value='0'
onChange='this.value=CKquantity(this.value)'></input> </font></td>
</FORM>
<FORM NAME='frmOrder39bx'>
<td width='53' valign='middle' align='center'><font size=-1>
<input type='text' size='3' name='QUANTITY'
value='0'></input> </font></td>
</FORM>
<FORM NAME='frmSubmitMe39'>
<td>
<input type="button" value="Buy"
onClick="ProcessBuys(document.forms['frmOrder39ea'],
document.forms['frmOrder39bx'])">
</td>
</FORM>
</tr>
====================================
**THE FUNCTON:
takes the two forms above and then works on them.
The line with the error is commented below.
====================================
function ProcessBuys(first, second) { //, second) { //Handles multiple items
//alert('1p- '+first.PRICE.value+' -1p 2p- '+second.PRICE.value+' -2p
1q- '+first.QUANTITY.value+' -1q 2q-'+second.QUANTITY.value+' -2q' );
if (! first){
alert('first object is null');
return false;
}
else {
if (first.QUANTITY.value!=null){ // <---- ERROR IS ON THIS LINE
if(first.QUANTITY.value>0){
AddToCart(first);
//alert('bye '+first.name+' bye');
}
}
else {
alert('first quantity is null');
}
}
if (second.QUANTITY.value!=null){
if(second.QUANTITY.value>0){
AddToCart(second);
//alert('abt '+first.name+' abt');
}
return false;
}
first=null;
second=null;
return true;
}
====================================
*****************************************
get the error:
'QUANTITY.value' is null or not an object in IE6.
The names used are generated on the server so it is not code that changes
due to being handwritten. I can't see any reason why this does work at
first then fails after a few uses. It is weird that it works perfectly but
after a few attempts it stops working.
**THE CALLER:
note there are some hidden fields but they are not used in this code.
====================================
<tr>
<FORM NAME='frmOrder39ea'>
<td width='50' valign='middle' align='center'><font size=-1>
<input type='text' size='3' name='QUANTITY' value='0'
onChange='this.value=CKquantity(this.value)'></input> </font></td>
</FORM>
<FORM NAME='frmOrder39bx'>
<td width='53' valign='middle' align='center'><font size=-1>
<input type='text' size='3' name='QUANTITY'
value='0'></input> </font></td>
</FORM>
<FORM NAME='frmSubmitMe39'>
<td>
<input type="button" value="Buy"
onClick="ProcessBuys(document.forms['frmOrder39ea'],
document.forms['frmOrder39bx'])">
</td>
</FORM>
</tr>
====================================
**THE FUNCTON:
takes the two forms above and then works on them.
The line with the error is commented below.
====================================
function ProcessBuys(first, second) { //, second) { //Handles multiple items
//alert('1p- '+first.PRICE.value+' -1p 2p- '+second.PRICE.value+' -2p
1q- '+first.QUANTITY.value+' -1q 2q-'+second.QUANTITY.value+' -2q' );
if (! first){
alert('first object is null');
return false;
}
else {
if (first.QUANTITY.value!=null){ // <---- ERROR IS ON THIS LINE
if(first.QUANTITY.value>0){
AddToCart(first);
//alert('bye '+first.name+' bye');
}
}
else {
alert('first quantity is null');
}
}
if (second.QUANTITY.value!=null){
if(second.QUANTITY.value>0){
AddToCart(second);
//alert('abt '+first.name+' abt');
}
return false;
}
first=null;
second=null;
return true;
}
====================================
*****************************************