Javascript via radio buttons to update quantity/cost on a cart page

Sonny Forelli

Well-known member
May 8, 2008
2,330
89
48
Liberty City
I realize this is laughably easy for most of you but if anyone can help me out or point me towards a tutorial with code framework i'd be extremely appreciative.

I have the following framework on a cart page:

http://top-health-products.com/test.html

I simply want to have the 3 radio quantity buttons dynamically change the quantity column, the total, and the shipping as they do in this example (HOWEVER - like a tard I'm doing it by showing/hiding page elements).

I also need to dynamically change a hidden quantity value passing to ultracart which on the real page is hidden in the form and looks like this:

<input id="cartquantity" type="hidden" name="ADD_PRODUCTNAME" value="1" />

This needs to change to value = 2 when two are selected and 3 when three are selected.

Can anyone help me out with an example page I can look at or a point in the right direction w/ code?

Thanks