• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

colored text in dropdown

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
I am using struts and in a form I have a dropdown / select box
I want a selective part of the text in the dropdown to appear in Red color
Here is how the code looks like :
[CODE]
<logic:iterate id="someName" name="<%=USER_DETAILS%>" type="UserAccountDetails">
<html ption value="customerId">
<bean:write name="someName" property="Name" />--
<bean:write name="someName" property="SurName" />--
<bean:write name="someName" property="balance" />
</html ption>
</logic:iterate>
[/CODE
The one in bold is what i want in red .
Thanks in advance ,
-satish
 
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about setting the propertly "balance" in the bean itself along with the html tags like
String balance = "<font color='red'>"+ $(balance value here)+"</font>";
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
THis is how you would code it on the html side, you do not use font tags in a dropdown!

Eric
reply
    Bookmark Topic Watch Topic
  • New Topic