Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Select Options, more data

Posted on 2015-02-11
2
Medium Priority
?
63 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 2000 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 84

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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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)
Suggested Courses

636 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