stuu
10-09-2003, 08:31 AM
Ok, I'm really stuck with this one. I have got the task of fixing a bug in an area of our web site. All the code was written by a colleague of mine that I can no longer contact. Basically, the error occurs when clicking the 'buy me now' button whether you input a quantity or not. Below is the code which I believe is causing the problem and there's a link to an example page with the problem.
http://www.yellow-square.co.uk/productdetails.asp?p=55&k=14&C=2 (http://www.yellow-square.co.uk/productdetails2.asp?p=55&k=14&C=2)
Here's the code:
<td width="61"><input size="5" type="text" name="InputQuantity" onchange="window.document.forms['BuyNow'].Quantity.value=this.value">
</td>
<td width="116"><span style="cursor:hand"><img src="gifs/buymenow.gif" name="submit[ID]" onclick="window.document.forms['BuyNow'].ProductID.value=['ID'];window.document.forms['BuyNow'].ProductName.value=['ProductName'];window.document.forms['BuyNow'].ProductCategory.value=['Category'];window.document.forms['BuyNow'].Price.value=['ProductRetailPrice'];window.document.forms['BuyNow'].submit()">
</span></td>
and here's the form stuff:
<form id="BuyNow" name="BuyNow" action="<%=wsHomeRoot%>AddToBasket.asp?M=14" method="post">
<input type="hidden" id="Quantity" name="Quantity" value="1">
<input type="hidden" name="ProductID">
<input type="hidden" name="ProductName">
<input type="hidden" name="ProductCategory">
<input type="hidden" name="Price">
</form>
Hope the code is clear enough, you might be better off looking directly at the source code.
Let me know if I missed anything.
any help you can give me as to why the error is occuring would be greatly appreciated.
Cheers.
http://www.yellow-square.co.uk/productdetails.asp?p=55&k=14&C=2 (http://www.yellow-square.co.uk/productdetails2.asp?p=55&k=14&C=2)
Here's the code:
<td width="61"><input size="5" type="text" name="InputQuantity" onchange="window.document.forms['BuyNow'].Quantity.value=this.value">
</td>
<td width="116"><span style="cursor:hand"><img src="gifs/buymenow.gif" name="submit[ID]" onclick="window.document.forms['BuyNow'].ProductID.value=['ID'];window.document.forms['BuyNow'].ProductName.value=['ProductName'];window.document.forms['BuyNow'].ProductCategory.value=['Category'];window.document.forms['BuyNow'].Price.value=['ProductRetailPrice'];window.document.forms['BuyNow'].submit()">
</span></td>
and here's the form stuff:
<form id="BuyNow" name="BuyNow" action="<%=wsHomeRoot%>AddToBasket.asp?M=14" method="post">
<input type="hidden" id="Quantity" name="Quantity" value="1">
<input type="hidden" name="ProductID">
<input type="hidden" name="ProductName">
<input type="hidden" name="ProductCategory">
<input type="hidden" name="Price">
</form>
Hope the code is clear enough, you might be better off looking directly at the source code.
Let me know if I missed anything.
any help you can give me as to why the error is occuring would be greatly appreciated.
Cheers.