Hi,
I am working on integrating a shopping cart solution into a friends site. We want to be able to click on one of the images on the site (not within a form tag) and have it change the state of radio buttons (in a form tag).
I have tried a variety of code snippets to no avail. The page that I have been working on is posted at:
[url]http://www.ssteindesign.com/sandbox/001-toolbag.html/
The current attempt includes the a call to this function:
function function1() {
form.purchaseForm.product[0].checked = true;
}
it is called in this html:
<img src=”/images/001-red-thumb.jpg” alt=”Toolbag in black canvas with espresso and red suede” width=”124″ height=”124″ id=”red” onclick=”MM_callJS(‘function1()’)” onmousedown=”MM_swapImage(‘big1′,”,’/images/001-red-252.jpg’,1);MM_swapImage(‘colors’,”,’/images/colors-red.png’,1)” />
The form looks like this:
<input name=”product[]” type=”radio” value=”black/espresso/red” />
<span class=”style6″> espresso/red </span><br />
<input name=”product[]” type=”radio” value=”odgreen/wine/parsley” />
<span class=”style6″>wine/parsley</span> <br />
<input name=”product[]” type=”radio” value=”burgundy/berry/parsley”/>
<span class=”style6″>berry/parsley</span><br />
<input name=”product[]” type=”radio” value=”black/espresso/lavendar”/>
The idea is that one could click on one of the four handbags and the radio button in the Purchase area would adjust accordingly, depending on the color clicked on. Any help would be much appreciated.
Thanks!