THanks!
ok I changed it all, and now the images that popup are are exact same image for each selection in the dropdown. In this case the image that is in the node is the one that repeats for each selection.
Here is all the code I have placed.
Code:
function diva_imgBySel(objId,theValue) { //v0.1 divaHTML.com
var sel_imgs=["images/pic01.jpg","images/pic01.jpg","images/pic02.jpg","images/pic03.jpg","images/pic04.jpeg","images/pic05.jpeg","images/pic06.jpeg","images/pic07.jpeg","images/pic08.jpeg"];
var d=document; imgindex=theValue-1;
theValue=sel_imgs[theValue];
if (!theValue || !d.getElementById ) return;
var obj = d.getElementById(objId);
if (obj) obj.src=theValue;
var tipindex = parseInt(selectobj.options[selectobj.selectedIndex].value-1)
if (isNaN(tipindex))
return
obj.parentNode.setAttribute('rel', 'imgtip['+tipindex+']')
$(obj.parentNode).unbind()
$('div.ddimgtooltip').hide()
if (imgindex>=0)
ddimgtooltip.init("*[rel^=imgtip]")
}
Code:
<td width="29%" height="192" align="center" valign="top"><p><a href="#" rel="imgtip[0]"><img src="images/pic01.jpg" alt="" name="theImg" width="147" height="161" id="theImg" style="border: 1px solid #ffffff;" align="LEFT" /></a><strong>Add a vase:</strong><input type="checkbox" name="anniv" id="anniv" value="6.95" onclick="priceUpdate('anniv');"/>
£6.95
</td>
<td width="71%" align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"></br> <select name="productColors" id="productColors" style="width:270px; margin-bottom:5px; margin-top:5px" onchange="diva_imgBySel('theImg',this.selectedIndex,this)">
<option value="1">Select Flower Arrangement</option>
<option value="2">Fabulous Freesia</option>
<option value="3">Lily and Rose Hand Tied</option>
<option value="4">Dozen Luxurious Roses</option>
<option value="5">Beautiful Blues</option>
<option value="6">Happiness</option>
<option value="7">Pure White</option>
<option value="8">Sunflower Sensation</option>
<option value="9">Tranquililty</option>
</select></td>
Code:
var ddimgtooltip={
tiparray:function(){
var tooltips=[]
//define each tooltip below: tooltip[inc]=['path_to_image', 'optional desc', optional_CSS_object]
//For desc parameter, backslash any special characters inside your text such as apotrophes ('). Example: "I\'m the king of the world"
//For CSS object, follow the syntax: {property1:"cssvalue1", property2:"cssvalue2", etc}
tooltips[0]=["images/pic01.jpg", " Skillfully embedded in green hyperion,this selection of </br> fresh freesia makes an enchanting bouquet.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[1]=["images/pic02.jpg", " Lovely lilies mixed with long stemmed pink roses,</br> with green foliage complimenting this beautiful bouquet.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[2]=["images/pic03.jpg", " In bull bloom, these 12 roses luxuriously define romance</br> and elegance.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[3]=["images/pic04.jpeg", " Set against exotic palm leaves, these blue and green blooms</br> mix well with the lilies, iris and delightful daisies.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[4]=["images/pic05.jpeg", " Colourful Gerberas, fresh lilies, blue Statis and cute </br>Carnations, truly brings back the joy of receiving flowers.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[5]=["images/pic06.jpeg", " Stunning white Gerberas, Sensational White Daisies and </br> Lime Green Roses,make up this peaceful bouquet.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[6]=["images/pic07.jpeg", " Fresh Sunflowers, lime green carnations and yellow roses </br> surrounded by folded aspidistra leaves.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[7]=["images/pic08.jpeg", " Beautiful white lilies and yellow tulips.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[8]=["images/pic08.jpeg", " this is a test.", {background:"#FFFFFF", font:"bold 12px Arial"}]
tooltips[9]=["images/pic08.jpeg", " this is a second test.", {background:"#FFFFFF", font:"bold 12px Arial"}]
return tooltips //do not remove/change this line
}(),
tooltipoffsets: [20, -30], //additional x and y offset from mouse cursor for tooltips
//***** NO NEED TO EDIT BEYOND HERE
Really sorry for all this. Thanks again.
Bookmarks