Community Forums 

Main Content

Re:How to change image during choose of product from drop down menu

    Jul 25 2016 17:40:25



    Join date : 2016-07-11      Posts : 23

    GT said As the script is breaking the productpr value at the colon and using the value after the colon, you do not need to use productpr, change it all back to the select name as before.

    Yes, but then we come back to the original question, because next variation wont work: document.images['pic'].src='images/'+this.options[this.selectedIndex].value+'.jpg'

    becouse price value detected like a continue of image name <option value="Silver_Metallic_colour :16.00 "> and this function (change image onclick) not working.

    So, the questions is - how to separate image name and price value here ...document.images['pic'].src='images/'+this.options[this.selectedIndex].value+'.jpg' ...