aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes change partial text color in option tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "change partial text color in option tag" Watch "change partial text color in option tag" New topic
Author

change partial text color in option tag

ram deal
Greenhorn

Joined: Apr 30, 2008
Posts: 2
how do I change the only part of the text in the following select list
i.e

change text color 'boy is blue' to blue
and
change text color 'girl is pink' to pink

<select name="test">
<option>boy is blue girl is pink</option>
</select>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61598
    
  67

This is not possible.
[ April 30, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
actually it is possible to add a classname or a style to the option tag, but it is not able to change the text inside of it to be different.

This is a very old article on doing it: http://www.netmechanic.com/news/vol4/design_no19.htm

Eric
[ April 30, 2008: Message edited by: Eric Pascarello ]
ram deal
Greenhorn

Joined: Apr 30, 2008
Posts: 2
Thank you very much for the response.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: change partial text color in option tag