C
chris leeds
I've got a shopping cart. when you go to the view cart page it's got the
item quantity in a little text box. there could be as many quantity text
boxes as there are different items in the cart. while I know, and most
people know, they can change the quantity in the text box by re-typing it,
I'd bet a lot of people don't know that.
for this reason I'd like to add little + and - buttons next to the quantity
box. I found this on the net:
<form>
<input type=text name=amount value=1>
<input type=button value="+ 1"
onClick="javascript:this.form.amount.value++;">
<input type=button value="- 1"
onClick="javascript:this.form.amount.value--;">
</form>
which would be fine but how can I make it so that each instance of the
button will add to or subtract from only the text box it's related to?
TIA
item quantity in a little text box. there could be as many quantity text
boxes as there are different items in the cart. while I know, and most
people know, they can change the quantity in the text box by re-typing it,
I'd bet a lot of people don't know that.
for this reason I'd like to add little + and - buttons next to the quantity
box. I found this on the net:
<form>
<input type=text name=amount value=1>
<input type=button value="+ 1"
onClick="javascript:this.form.amount.value++;">
<input type=button value="- 1"
onClick="javascript:this.form.amount.value--;">
</form>
which would be fine but how can I make it so that each instance of the
button will add to or subtract from only the text box it's related to?
TIA