Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Modifying <option select> element

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-31-2005, 11:15 PM
 
Mr Bob Mr Bob is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 199
 

Default 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?
__________________
Product: X-Cart Gold
Current version: 4.0.14

Additional Mods: X-Affiliate
Reply With Quote
  #2  
Old 11-01-2005, 03:17 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 11-01-2005, 05:42 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

theres a few mods for this in the custom mods forum too
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 11-01-2005, 09:24 AM
 
Mr Bob Mr Bob is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 199
 

Default

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.
__________________
Product: X-Cart Gold
Current version: 4.0.14

Additional Mods: X-Affiliate
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:07 PM.

   

 
X-Cart forums © 2001-2020