mercredi 1 avril 2015

custom tag containing data in option

I am having a list of stuff that the user can select. The way it's currently made, we have an integer as name, a price as value but i need to add a color. It's not unique so i cannot use ID.


example :



<option name='6' value="30.95">6 Orange(30.95$/month)</option>
<option name='6' value="33.95">6 Green(33.95$/month)</option>
<option name='10' value="32.95">10 Orange(32.95$/month)</option>
<option name='10' value="35.95">10 Green(35.95$/month)</option>


I need to combine two non-unique values and them to be accessible by jQuery / Jscript


I would like not to make two selects. I know it's straightforward the easiest solution but if i could stick to a single one that would give better results.


Is it safe to create a custom tag like "prodcolor" with any non-reserved nametag or is there a smarter way to achieve this?


Many thanks once again.


Aucun commentaire:

Enregistrer un commentaire