Hi
Im processiing a json response
link_cart.setAttribute('id',bits[i].product_id);
link_cart.onclick = function(){
add_to_cart(bits[i].product_id);
}
In the first line, the product_id value is correct, the json is a list of products, but it doesn't behave strangely,
But the second reference in the onclick handler, displays a value of 22, which is the product_id of the last of 22 products...
I feel im missing a small, key piece of info here...
Help!