jamestanner
Programmer
im trying to set a variable using cfset dependant on what link is clicked, how can i do this? i cant make it work (
my code is:
<a href="javascript:document.myform.submit()" class="newsimage" onclick="return <cfset prop_brand='fr0002'>; <cfset prop_name='Cava + Glasses'>; <cfset prop_description='Perfect for center of table'>; <cfset prop_ref='Freixenet'>" onmouseover= "document.getElementById('brandsite').innerHTML='ref: <span class=brandlink> FR0002</span>';document.getElementById('description').innerHTML='freixenet cava<br><br>looks ideal in the center of a dinner table'; document.getElementById('product').innerHTML='freixenet cava + glasses'; changeImages('image2','image2on', 'otherImage', 'otherImage2')" onMouseOut="document.getElementById('brandsite').innerHTML='ref: '; document.getElementById('product').innerHTML='';document.getElementById('description').innerHTML=''; changeImages('image2','image2off', 'otherImage','otherImageDefault')"><img src="images/catalogue/fr0002.gif" alt="fr" name="image2" width="72" height="72" hspace="0" vspace="0" border="0" id="image2"></a>
There are 6 of these on my page (the fr numbers are different as are the image rollovers) but it always sets the values as the last link!!???
when i click on any image, the CFSET does not get set?
how can i achieve this??
Many thanks
my code is:
<a href="javascript:document.myform.submit()" class="newsimage" onclick="return <cfset prop_brand='fr0002'>; <cfset prop_name='Cava + Glasses'>; <cfset prop_description='Perfect for center of table'>; <cfset prop_ref='Freixenet'>" onmouseover= "document.getElementById('brandsite').innerHTML='ref: <span class=brandlink> FR0002</span>';document.getElementById('description').innerHTML='freixenet cava<br><br>looks ideal in the center of a dinner table'; document.getElementById('product').innerHTML='freixenet cava + glasses'; changeImages('image2','image2on', 'otherImage', 'otherImage2')" onMouseOut="document.getElementById('brandsite').innerHTML='ref: '; document.getElementById('product').innerHTML='';document.getElementById('description').innerHTML=''; changeImages('image2','image2off', 'otherImage','otherImageDefault')"><img src="images/catalogue/fr0002.gif" alt="fr" name="image2" width="72" height="72" hspace="0" vspace="0" border="0" id="image2"></a>
There are 6 of these on my page (the fr numbers are different as are the image rollovers) but it always sets the values as the last link!!???
when i click on any image, the CFSET does not get set?
how can i achieve this??
Many thanks