Does anyone know how I can get links in a slide show that use the same image map co-ordinates to submit different values to a shopping cart!
For example, I have three images in my slide show, each with three products on them and each with three ‘Add to cart’ links created using an image map. I want each link to submit unique values to the shopping basket but can so far only get it to work for the first image. I dont know how to set it up so that when the second image in the slideshow is loaded, the image maps will submit different values to the basket.
Here is some of my code:
Image Map
<map name = “prodmap”>
<area href = “JavaScript:additem(‘Fatherxmas’, 1.95,1);” shape = “rect”
coords = “39,217,110,250”/>
<area href = “JavaScript:additem(‘Bears’, 2.99,1);” shape = “rect”
coords = “180,217,250,250”/>
<area href = “JavaScript:additem(‘Dinosaurs’, 1.65,1);” shape = “rect”
coords = “325,217,398,250”/>
</map>
AddItem function:
function additem(desc, price,quantity) {
items[++numitems] = new Item(desc,price,quantity);
displaycart();
}
Hopefully someone will understand this problem an be able to offer some help!
Thanks!