Solved

Select Options, more data

Posted on 2015-02-11
2
57 Views
Last Modified: 2015-02-11
Is there a way to add additional information to a select options ?
<select>
<option name="option_one" id="option_one" ADDTIONAL DATA="additional_data_one" ADDTIONAL DATA="additional_data_two">OPTION ONE</option>

<option name="option_two" id="option_two" ADDTIONAL DATA="additional_data_one" ADDTIONAL DATA="additional_data_two">OPTION TWO</option>
</select>
0
Comment
Question by:rgranlund
2 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 40604382
Of course. Use the data- attribute.

Example:
<option name="option_one" id="option_one" data-whatever="additional_data_one" data-something="additional_data_two">OPTION ONE</option>

http://www.w3schools.com/tags/att_global_data.asp
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40604389
I'm not sure what the point of all that is since you have no 'value' in your options.  The 'value' is what gets submitted when you submit the form.
http://www.w3schools.com/html/html_form_elements.asp
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now