Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
All kinds of weird going on here!
Old 06-25-2008, 02:58 PM All kinds of weird going on here!
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
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.
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to All kinds of weird going on here!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14969 seconds with 12 queries