Solved

Select Options, more data

Posted on 2015-02-11
2
60 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

733 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