Skip to Content
author's profile photo Former Member
Former Member

Htmlb DropDown + Colors

Is it possible to set a color to a value in the Dropdown Box of htmlb dropdown box??

Dropdown values are being populated from a model.

If i need to set a color in the bean or Dynpage..could you guide me how?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 10, 2005 at 01:33 PM

    nice idea..will try.

    if i find something i wud post it here..

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 10, 2005 at 07:32 PM

    Hi Taylor,

    I haven't tried it myself but my direction would be:

    1. Get the dropdown element in javascript

    2. Change one of its attributes (perhaps style).

    this.getPageContext().setCurrentForm(myForm);
    String id = this.getPageContext().getParamIdForComponent(myDropDown);
    myForm.addRawText("var element = document.getElementById('"+id+"');");
    myForm.addRawText("element.style.color='#C00F12';");

    Hope that helps,

    Yoav.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.