B
bkaneweb
Hi,
I was working on a site that uses Google Checkout buy now buttons, and
I wanted the product picture to change based on what was picked. I was
able to have it change the picture, but if you pick a new item after
that, it keeps the same picture. Here;s the code:
The box (only the first part):
<form action="https://checkout.google.com/cws/v2/Merchant/
**************/checkout" id="BB_BuyButtonForm" method="post"
name="BB_BuyButtonForm" onchange="picchange()">
<table cellpadding="5" cellspacing="0" width="1%">
<tr>
<td align="right" width="1%">
<select name="buyButtonCart" "><form action="https://
checkout.google.com/cws/v2/Merchant/*************/checkout"
id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm"
onchange="picchange()">
<table cellpadding="5" cellspacing="0" width="1%">
<tr>
<td align="right" width="1%">
<select name="buyButtonCart" onchange="picchange()">
The function:
<script language="javascript" type="text/javascript">
function picchange()
{
var selecteditem =
document.BB_BuyButtonForm.buyButtonCart.selectedIndex
if (selecteditem="0") {var picname = "Image0.png"}
if (selecteditem="1") {var picname = "Image10.png"}
if (selecteditem="2") {var picname = "Image0.png"}
document.images.pictures.src='/LICF/IMG/' + picname
var picname=""
}
</script>
The photo:
<img src="/LICF/IMG/products.jpg" name="pictures" width="196"
height="156" />
Any help would be great... Thanks!
I was working on a site that uses Google Checkout buy now buttons, and
I wanted the product picture to change based on what was picked. I was
able to have it change the picture, but if you pick a new item after
that, it keeps the same picture. Here;s the code:
The box (only the first part):
<form action="https://checkout.google.com/cws/v2/Merchant/
**************/checkout" id="BB_BuyButtonForm" method="post"
name="BB_BuyButtonForm" onchange="picchange()">
<table cellpadding="5" cellspacing="0" width="1%">
<tr>
<td align="right" width="1%">
<select name="buyButtonCart" "><form action="https://
checkout.google.com/cws/v2/Merchant/*************/checkout"
id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm"
onchange="picchange()">
<table cellpadding="5" cellspacing="0" width="1%">
<tr>
<td align="right" width="1%">
<select name="buyButtonCart" onchange="picchange()">
The function:
<script language="javascript" type="text/javascript">
function picchange()
{
var selecteditem =
document.BB_BuyButtonForm.buyButtonCart.selectedIndex
if (selecteditem="0") {var picname = "Image0.png"}
if (selecteditem="1") {var picname = "Image10.png"}
if (selecteditem="2") {var picname = "Image0.png"}
document.images.pictures.src='/LICF/IMG/' + picname
var picname=""
}
</script>
The photo:
<img src="/LICF/IMG/products.jpg" name="pictures" width="196"
height="156" />
Any help would be great... Thanks!