I am currently making a shopping cart, yet im having some troubles on my products page showing the proudct.
I want users to be able to see how much its going to cost when they input there quality they would like to get.
Using Javascript the onkeyup able to get what the person has inputted, yet i am having some troubles passing it.
Quote:
<script type="text/javascript">
function writeMessage<? $c = $c;$c=$c+1; echo $c; ?>() {
document.cart_quantity.quality<? echo $c; ?>.value=cart_quantity.Qty_ProdId_<?php echo '[' . $products_options['products_options_values_id'] . ']'; ?>.value;
}
</script>
|
It comes up as an error, the reason for the $c is that it is in a loop.
The error reads:
'cart_quality.Qty_ProdId_.1' is null or not an object
Im using
Qty_ProdID_[$i] in PHP to pick up the different product ids and is the name of the input box were users input the quality.'
Hope you can help me and that you understand my query.
Thank you.