X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Modifying <option select> element (https://forum.x-cart.com/showthread.php?t=17656)

Mr Bob 10-31-2005 11:15 PM

Modifying <option select> element
 
Currently one of my option selects outputs this code:

Code:

<select id="po23758" name="product_options[23758]" onchange="javascript: check_options();">
<option value="102253">Designer's Pick</option>
<option value="102254">Sand</option>
<option value="102255">Amethyst</option>
<option value="102256">Smooth Grey</option>
<option value="102257">Teal</option>
<option value="102258">Red Enamel</option>
<option value="102259">Blue Enamel</option>
</select>


I want to change that, so it outputs this instead:

Code:

[img]/skin1/img/content/backgrounds/Default_Swatch.jpg[/img]</td>
<select onchange="if(document.images) document.images['ImageSample'].src='/skin1/img/content/backgrounds/'+this.options[this.selectedIndex].value+'.jpg';">
<option value="102253">Designer's Pick</option>
<option value="102254">Sand</option>
<option value="102255">Amethyst</option>
<option value="102256">Smooth Grey</option>
<option value="102257">Teal</option>
<option value="102258">Red Enamel</option>
<option value="102259">Blue Enamel</option>
</select>


Basically, whenever you modify your option, it will show a small preview of the image.

Is this easily possible?

balinor 11-01-2005 03:17 AM

People have been asking for this forever. If you have looked at 4.1 beta, you'll notice that options have images built in, finally.

shan 11-01-2005 05:42 AM

theres a few mods for this in the custom mods forum too

Mr Bob 11-01-2005 09:24 AM

I've searched for posts regarding the modification of the option select element, but found nothing.

My exact search phrase was "option and select". What else would someone call this?

I haven't looked at the Beta version yet, but plan to do so. I wouldn't ever want to use it on a live site, so it is kind of useless to me right now. :roll:


All times are GMT -8. The time now is 10:15 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.