This is a line that is written for each record in a database. (x = Record number)
Code:
Response.Write(" <td height=20 align='center'><a id='Qty"&x&"'><input name='CrtQty"&x&"' type='text' id='CrtQty"&x&"' value="&Qty&" size='3' maxlength='3' onkeyup = 'CartEdit("&x&",(this.value),"&Items.Fields("ProdID")&"); return false'></a>"&vbcrlf)
This is the first part of the function called by the onkeyup in the line above.
I inserted the alerts to check my values.
Code:
function CartEdit(RecNum,Qty,ProdID)
{
alert(RecNum)
alert(Qty)
alert(ProdID)
For the first line of the above code ProdID is returned as 570, no matter what the actual value is... the rest of the lines work fine.
Here is an example of the generated code.
Code:
<tr>
<td height=20 align='center'><a id='Qty0'><input name='CrtQty0' type='text' id='CrtQty0' value=1 size='3' maxlength='3' onkeyup = 'CartEdit(0,(this.value),01072); return false'></a>
<td height=20 align='left'><a id='Dsc0'>Regular, 60oz, Can</a></td>
<td height=20 align='center'><img height='20' border='0' src='/images/Products/01072.png' onMouseOver='this.height=150'; onMouseOut='this.height=20';></td>
<td height=20 align='right'><a id='Ech0'>$1.99</a></td>
<td height=20 align='right'><a id='Ext0'>$1.99</a></td>
<td height=20 align='right'><a id='Shp0'>$0.39</a></td>
<td height=20 align='right'><a id='Ttl0'>$2.38</a></td>
</tr>
<tr>
<td height=20 align='center'><a id='Qty1'><input name='CrtQty1' type='text' id='CrtQty1' value=1 size='3' maxlength='3' onkeyup = 'CartEdit(1,(this.value),80078); return false'></a>
<td height=20 align='left'><a id='Dsc1'>Mixed Fruit, large, Bag</a></td>
<td height=20 align='center'><img height='20' border='0' src='/images/Products/80078.png' onMouseOver='this.height=150'; onMouseOut='this.height=20';></td>
<td height=20 align='right'><a id='Ech1'>$1.99</a></td>
<td height=20 align='right'><a id='Ext1'>$1.99</a></td>
<td height=20 align='right'><a id='Shp1'>$0.39</a></td>
<td height=20 align='right'><a id='Ttl1'>$2.38</a></td>
</tr>
<tr>
<td height=20 align='center'><a id='Qty2'><input name='CrtQty2' type='text' id='CrtQty2' value=1 size='3' maxlength='3' onkeyup = 'CartEdit(2,(this.value),80032); return false'></a>
<td height=20 align='left'><a id='Dsc2'>Sour Gummy Bears, large, Bag</a></td>
<td height=20 align='center'><img height='20' border='0' src='/images/Products/80032.png' onMouseOver='this.height=150'; onMouseOut='this.height=20';></td>
<td height=20 align='right'><a id='Ech2'>$1.99</a></td>
<td height=20 align='right'><a id='Ext2'>$1.99</a></td>
<td height=20 align='right'><a id='Shp2'>$0.39</a></td>
<td height=20 align='right'><a id='Ttl2'>$2.38</a></td>
</tr>
<tr>
<td height=20 align='center'><a id='Qty3'><input name='CrtQty3' type='text' id='CrtQty3' value=1 size='3' maxlength='3' onkeyup = 'CartEdit(3,(this.value),80004); return false'></a>
<td height=20 align='left'><a id='Dsc3'>Gourmet Mix, 9oz, Bag</a></td>
<td height=20 align='center'><img height='20' border='0' src='/images/Products/80004.png' onMouseOver='this.height=150'; onMouseOut='this.height=20';></td>
<td height=20 align='right'><a id='Ech3'>$1.99</a></td>
<td height=20 align='right'><a id='Ext3'>$1.99</a></td>
<td height=20 align='right'><a id='Shp3'>$0.39</a></td>
<td height=20 align='right'><a id='Ttl3'>$2.38</a></td>
</tr>
The value in "01072" when displayed in the alert is "570"
The other lines alert the proper values, any idea what is going on here? I am at a total loss.