File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Need suggestion on select option text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Need suggestion on select option text" Watch "Need suggestion on select option text" New topic

Need suggestion on select option text

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 415


I have a drop-down of users. I need a way to display role of that user just next to its name. I need some good way to do this. Just want to make sure that is easy for User to understand.

Pawan Chopra
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

With a native dropdown, you're kinda stuck with plain text. So you could put a comma and the role. But beyond that, there's not a whole lot of other options for formatting.

If you look around, you can likely find jQuery plugin replacements for dropdowns that would let you do more formatting in the engineered dropdown, likely including columns.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Need suggestion on select option text
It's not a secret anymore!