Changing drop down list appearance

I was wonder how I can add additional attributes to a drop down list. I would like to add a different color to each option in the box. Something similar to the following code:
<style type="text/css">
.bg1{background-color:FF0000}
.bg2{background-color:00FF00}
.bg3{background-color:0000FF}
</style>
<form action="" method="post">
<select name="foo">
     <option class="bg1">red</option>
     <option class="bg2">green</option>
     <option class="bg3">blue</option>
</select>
</form>
I can't seem to find were I can add this informaiton. Thank you in advance.

sorry about that, thomas. maybe it'd help if i read your post more closely before responding. anyhow, i had to get carl's help for this, but here are two ways to implement your request...
javascript approach: just drop in a jscript function that checks your option values and displays them as you'd like. so if you had a select list item, P2_DEPTNO, with an lov query like...
select dname, deptno from dept
...you could place this javascript...
<script language=JavaScript type=text/javascript>
<!--
var pThis = document.getElementById('P2_DEPTNO');
var pThose = pThis.getElementsByTagName('OPTION');
for(var i=0;i < pThose.length;i++){
/*change this logic for colors*/
if(pThose.value == "10"){
pThose[i].style.background = "#00FF00";
if(pThose[i].value == "20"){
pThose[i].style.background = "#996633";
if(pThose[i].value == "30"){
pThose[i].style.background = "#0000FF";
if(pThose[i].value == "40"){
pThose[i].style.background = "#FF0000";
//-->
</script>
...in the "Post Element Text" field of the item-level attributes page of your item.
style approach: i'm not a css pro, but if your users use browsers that are somewhat css compliant (not IE), you can use define a style like...
<style type="text/css">
<!-- .myColors{}
.myColors > option{background-color:#336699;}
.myColors > option+option{background-color:#FF0000;}
.myColors > option+option+option{background-color:#FFFF00;}
.myColors > option+option+option+option{background-color:#996633;}
.myColors > option+option+option+option+option{background-color:#669933;}
-->
</style>
...also in that "Post Element Text" field (or in your CSS, of course) and drop a...
class="myColors"
...into the "HTML Form Element Attributes" field on that same page.
hope this helps,
raj

Similar Messages

  • Just started using Firefox; problem re log into New Yahoo; i have typed in my ID including several mistakes and i want to get rid of these from the drop down list that appears when i start to enter my ID. 'Clear History' does not seem to deal with this.

    OR even better stop the drop down list appearing altogether;

    Take a look here:
    https://support.mozilla.com/en-US/questions/871553
    thank you

  • Adobe LiveCycle Designer working with 2 drop down list, one response triggers the other

    I am fairly new to Adobe LiveCycle Designer ES 8.2, but I would like to have a drop down list of managers and another drop down list of employees.
    I would like this set up in such a way where the manager can click on their own name in the manager list and have a drop down list appear which is only populated with their directly reporting employees.  They can then click on the individual employee they are going to report on.
    Then there will be several questions pertaining to the individual direct report, etc. (This part I can do)
    Is this possible?
    If so, please provide detailed instructions for me to try.
    Thank you in advance.

    Put this in the change event of your Manager drop down:
    var myObj={"Manager 1":"Employee A,Employee B,Employee C",
                        "Manager 2":"Employee D,Employee E",
                        "Manager 3":"Employee F,Employee G, Employee H"};
    DropDownList2.setItems(myObj[this.boundItem(xfa.event.newText)]);
    This is assuming the list of items in that dropdown is "Manager 1", "Manager 2", "Manager 3".
    And DropDownList2 is the name of your Employee drop down.
    Kyle

  • Unable to clear the drop down list of junk login ID's - I have a Mac OSX

    When I go to sign into my yahoo ID, and I begin to type my e-mail account, a drop down list of junk log in ID's pop up. These are ID which I have entered my mistake in the pass. One of which is my password. I am unable to clear the drop down list of this junk log in ID's. I ask Yahoo how to do it and I was told that this problem is specific of my web browser. I need your help to clear that junk log in ID's. I have a Mac OSX, Version 10/4. Would you be able to explain simple what to do. This problem is annoying as every time I sign in that drop down list appear.
    I would appreciate your assistance.
    Sincerely,
    Socorro Bery

    good afternoon  Limnos i think  i didnt give the right info I didnt download well in a way i did i bought a copy of microsoft excel for mac 2004 i loaded on to my mac then i went and down loaded some software that said i needed to have excel you see my mac is osx 10.4,11 power pc G4 and that is were i had the problem now  the excell loaded allright but the the other programs did not the pop ups say it is not scriptable or can not read dictionary if you can help m,e iam not great with computers but i  along

  • How to add drop down list in toolbar?

    Hi SAP CRM Experts,
    After save the personalization of the view, there will be a drop down list appeared in the toolbar in the view, the drop value contain the personalization you just saved and the standard one.
    Could someone let me know how to enhance this functionality to create not only the view configuration but also customizing field drop down list?
    That means we want drop down list in toolbar which contain several options also it's value could pass to view controller.
    Thanks in advance...
    Tony

    Could someone kindly help?

  • Excel drop-down lists

    Hi,
    Someone emailed an Excel spreadsheet to me and the spreadsheet is supposed to contain drop-down lists, but it doesn't. If I open the spreadsheet on a desktop (ie not a mac), the drop-down lists appear as they are supposed to. Does anyone know what I can do to make the lists appear on my mac? Thanks!!

    Hi
    Welcome to Apple discussions
    Excel spreadsheets are meant to be opened by the Excel program, which is part of Microsoft Office. This would normally mean that they will only open on machines on which MS Office is installed. You can buy MS Office for Macs but there is a free alternative. If you download and install the free NeoOffice program from http://www.neooffice.org/neojava/en/index.php it should be able to open your Excel spreadsheet for you.
    Bob

  • Changing the size of a drop down list

    Hi Everyone,
    Is there anyway to change the size of a drop down list?  For example, our customer would like to make the drop down list for the Ship-To field on the logistics tab of the sales orders longer.  Currently, they cannot see the full name when they scroll through it.  Is this possible?  Depending on what Customer Code they enter, the field size appears to change.
    Thank you in advance for your help.
    Amanda

    I am using Tahoma size 10 as well. 
    Is the drop down size somehow related to the size of the first few records?  So, if those are shorter than those at the end, perhaps it doesn't adjust for the size of the bottom records.  For example, in our customer's database here's a sampling of what they have entered and the order:
    Wal-Mart 6124
    Wal-Mart 6125
    Wal-Mart 6126
    Wal-Mart 7001
    Wal-Mart Supercenter 1111
    Wal-Mart Supercenter 2094
    Wal-Mart Supercenter 3475
    The drop down box is large enough to see the Wal-Mart 6124, etc. but not large enough to see the Wal-Mart Supercenter ones at the bottom of the list (keep in mind there are over 100 ship-to's for this Business Parnter).  Does it maybe only look at the first fifty records or something like that?
    Thanks again,
    Amanda

  • The drop-down list that appears when typing in the Google search bar doesn't work. Clicking on an item on that list does nothing. This very useful feature is broken.

    I just installed FireFox 4. In previous versions typing in the Google search box automatically created a drop-down list of items. One could click on an item on the list and proceed to a Google results page. In FireFox 4, the list appears but clicking on an item on the drop-down menu does nothing. It's broken and it was a very useful feature in previous versions.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • How to change number of remembered items which would be shown in drop down list for edit controls. This use to be at least 5 I think, but now it is only 2!

    I need to see 3 different remembered usernames in drop-down list for username input.

    Works fine here. I can see at least four user names in the drop down list of a login form.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to change the width of the auto complete drop down list?

    Hi,
    I implemented an autocomplete mechanism, using ICompletionSession and ICompletionSourceProvider. I have an issue with the size of the drop-down list opened when I use this autocomplete mechanism. The width of the autocomplete list remains the same, even
    if the strings displayed change. This is apparent especially when I hit "backspace" on the already typed string, while the drop down list is opened: the deletion of the last character allows for more completion strings to be used, but since the drop
    down width does not change, the longer strings appear cut.
    Is there a way to force the drop down list to recalculate its width?
    Yoel

    I don't think there's any way, even VS itself can't do that you know, and the interfaces don't have such kind of events or properties.

  • No countries names appear in the countries drop down list

    I bought a new playbook 32 GB
    During installation, and at the ID Legal Agreement Screen it is requested to select my country, but the drop down list of the countries does not have any countries names. It appears only white.
    I am unable to continue the setup because of this.
    Any solution?

    The problem may be with the wifi signal you are receiving. Is it coming from your own router or an open wifi signal elsewhere else? If it is your own signal you may have to make some changes even if other computer equipment is working fine. The PlayBook likes 802.11g, WPA2 Personal, AES/PSK.

  • Change a drop down list from read only/invisable on a radiobutton value

    Hi All i am new to all this and need a few pointers?
    I have a form which was made using Livecycle Designer 8.
    On this form are a set of radio buttons (yes/no/NA).
    Is there a way to change the state of a drop down list from read only or invisible and display a message after 'no' has been selected on a set of radio buttons?
    Thanks in advance.

    No being in a table shoudl not affect it.....but you will more than likely have to include the path to the object. Without seeing your form it is impossible to tell you what it should be. You can place your cursor in the script editor where you want the reference to the DDList. Then hold down the Ctrl key and move your mouse to point to the field you want to reference. When the cursor hits the canvas it will change to a V. When you get to the field you want click the mouse button and the expression that you need will be placed in the script editor. This is path relative to where the context in which the script will be run. Now you can simply add the "." and whatever method/property that you want to reference.
    Hope that helps
    Paul

  • Output devices list  not appearing completely in the drop down list

    Hi,
    I have a query where I am not able to see all the 583 output devices in the drop down list of output device for a transaction code whereas I can see all the output devices in SPAD. Can anyone tell me the reason for this?
    Thanks.
    Brijesh

    Dear Brijesh,
    You can show all the value, click on the restriction button, then change the max numbers of hits to 10000,then you can list all the data in drop down, as per i know in standard it will only give you 500.
    Regards

  • Getting the rawValue of a Drop-Down list on the "change" event

    I am having problems getting the rawValue of a Drop-Down list on the "change" event. It seems that you have to select the same item twice in a row to get the rawValue to be the value of the selected item.
    ::dropdownlist onChange event::
    xfa.host.messageBox(this.rawValue);
    On the first time a value is selected you get 'null'. The second time the same value is selected, you get the selected value.
    Does anyone have any thoughts on why this is happening? Also, I CANNOT use xfa.event.newText, I need to use the rawValue of the dropdownlist.
    Thanks

    The change event occurs before the rawValue is changed. If you NEED to use the rawValue you'll need to use a later event. Perhaps you could use exit so that it gets triggered when the field loses focus?
    Chris
    Adobe Enterprise Developer Support

  • How to change the  attribute of screen field to drop down list dynamically

    Hi All,
      Col X                   Col Y
      A                        input field
      B                       drop down list
    This is a tabular disply where the Screen field attribute for Col y  is NO DROP DOWN BOX.
    My requirement is to change the attribute of COl Y to DROP DOWN list depending on the value of
      COL X  dynamically.

    Dear Ajay,
    Actually this requirement is to enhance the standard screen for Tcode :EHSVU21.
    So depending on the 1st Column(Test no)  value ,i have to change the 3rd Column(Low.norm.result)
    property either to DROP Down or not.
    So in the PBO only the changes to be made and there is no field in SCREEN internal table for changing the attribute to DROP down. I checked SCREEN internal table where the field VALUE_HELP and REQUEST is useful but not  suitable for my case.
    Any solution available?

Maybe you are looking for

  • What's the deal with bluetooth mice ?

    What's the deal with bluetooth mice ? I've never heard of any model yet that didn't come with loads of complain... (I've done my research) ... isn't there one that just works fine and that will for a few years like a standard mouse ? I would really l

  • Read a file's certain part

    I have a text file with the following content: ID: 1 Nume film: Batman returns An film: 2004 ID: 2 Nume film: Lord of the rings 3 An film: 2005 How can I search for the line where "ID: 2" is, and read that line, and the next two. I want to read them

  • Updated 05 to 06 - how do i completely remove ilife 05?

    have installed ilife 06 - but ilife still remains in my home> applications folder - how can i completely remove ilife 05? or has it overwritten the previous ilife05 folders? Ilife06 is in Mac hdd> applications folder.

  • Thousands of connected AFP users

    For some unknown reason when my rMBP is idle it ends up accumulating thousands of connected AFP users if I put it to sleep while connected.  Pictured below. (NOTE:  I am on 10.10 beta in the picture but it happens on 10.9 too.  The server is running

  • Why cannot I move any files to the trash from my external drive?

    I have Snow Leopard 10.6.8 and an external hard drive Toshiba.  I've formatted it to be used with OSX and have copied lots of files there for use as a third hard drive to save files on.   But I now have found out that I cannot delete any files from t