Click to change color of field

When a user clicks a field I want the color to change. Each click will result in a different color (of 5). I assume I need an array but am currently unable to get it to work.
I have the following code on a mouseUp:
function changeColor()
var changeColor= new Array(5)
changeColor[0]="10,100,50";
changeColor[1]="100,120,70";
changeColor[2]="80,10,30";
changeColor[3]="20,120,65";
changeColor[4]="15,150,50";
var x=0;
for (x=0; x<5; x++)
TextField1.fillColor = changeColor[x];}

Its running through all 5 colors in the array and the last one is being displayed. It is not setting it to the 0 color on the 1st click etc...

Similar Messages

  • Simple way to change color of field in an interactive report

    Is there a simple way with css to change the color of a field in an interactive report. I want certain fields to stand out.
    Can you provide an example and where the code is inserted in APEX? TY.

    jfr620 wrote:
    Is there a simple way with css to change the color of a field in an interactive report. I want certain fields to stand out.On what basis?
    The appearance of cells based on the report structure can be controlled using CSS: +{message:id=10373505}+
    Conditional formatting based on cell values is better handled using the built-in highlighting, or Dynamic Actions/JavaScript, which provide better separation of concerns than generating HTML in the query: +{message:id=10493230}+
    (For even better separation, use the Dynamic Action to apply <tt>class</tt>es rather than setting style properties directly, and use separate CSS rules to apply the formatting.)

  • Click Wheel Changing Colors?

    I've noticed within the last few weeks that the click wheel on my pink ipod mini is turning pink. I'm not sure if the paint is leaking from the body on the wheel or what.
    How do I go about contacting Apple about this issue, so that they can let me know if it's something I need to be concerned with or not.
    Thanks for your help!
    Dell   Windows XP  

    Welcome to Apple Discussions!
    If you want to contact Apple...
    Apple Phone Numbers
    btabz

  • Change color of text in one field to white on a invoice form

    Hello,
    I have the following problem:
    On our invoice document, I defined a frame in the upper left corner, where I want to print some steering signs
    For our postal machine.
    I want to change the printing colour only for the content of the defined field to u201Cwhiteu201D instead of black like the rest.
    I found settings like, bold, underlined, hidden.... but nothing with color
    Is there any possibility to do that ?
    If yes can you give me a guide or whatever on information you have ??
    Thanks in advance

    Hi,
    Thread is not clear.If it is only printing of symbols you can do like this way.Add a Text node in SAP Smartform .Click the Change Editor buton to continue with a more advanced text editor.Then select characters,special symbols.
    Regards,
    Madhu.

  • Reporting: Change Color on Prompt fields

    I need to know if we can change color options for prompt fields?
    Thanks,
    Rick

    Regarding prompt feild no idea.
    We can change the colour of that data which comes after prompting parameter.
    I mean  you have created a parameter Country then you can change the colour of field based on parameter by writing formula.
    Right click on field-> Format field->Font tab->on color clik on X-2
    write formula if {?My parameter}="USA" then red
    Have a look to Sample reports:
    [Crystal Reportsample |https://boc.sdn.sap.com/crsamples]
    Hope that helps!!
    Regards,
    Shweta

  • How do I get a field to automatically select a value and change color based on another automatic field?

    Here is the situation:
    I have a row on a form called Finding Risk Rating. In this row are four fields: Probability, Severity, Risk Rating, Color.
    Probability is a drop down menu with the following values: 1, 2, 3, 4, 5
    Severity is a drop down menu with the following values: A, B, C, D, E
    Risk Rating is a field that I have a custom calculation script:
    var riskRating = this.getField("Probability").value+this.getField("Severity").value;
    event.value = riskRating;
    So, when I pick Probability = 1 and Severity = D, Risk Rating will automatically change to 1D, etc. This works fine on the surface as far as I can tell.
    The part where I am stuck, is the fourth field Color.
    Ideally, I want Color to be automatically populated depending on the value of Risk Rating. For example, for 1E I would want it to say "YELLOW" and the field to change color to yellow. For 1A it would be "GREEN" with the color green, etc.
    I tried doing an if else for all cases, but it never refreshes to the correct value. I then checked using app.alert to see what fields riskRating and colorRank are (see code below), and I noticed that riskRating never changes, even though the value in Risk Rating changes. Is there a way to order script(s) so that if I execute one, the other will follow? I'm new to scripting for forms and haven't done any programming in 10+ years, so feel free to rip my code in favor or something more efficient, or direct me to a good resource I can learn from.
    Here's the basis of what I have for scripting on Color. It's brief because I wanted to test it out before writing every 'if else' statement.
    var colorRank;
    var riskRating = this.getField("Risk Rating").value;
    if (riskRating = "1E") colorRank = "YELLOW";
    else if (riskRating = "1A") colorRank = "GREEN";
    else if (riskRating = "5A") colorRank = "RED";
    event.value = colorRank;
    app.alert("colorRank = " + colorRank + ", riskRating = " + riskRating);
    Any help is appreciated. Thanks!

    One problem is if more than one combo box item has the same number associated with it, you cannot simply set the export value to the corresponding number since they need to be unique (or the user interface behaves weird). One thing you can do is set up an object to associate a list item with a value, and look up the value in code when a list item is selected.
    For more information, see: http://acrobatusers.com/tutorials/2007/js_list_combo_livecycle

  • Change color of key field in salv_table

    Hello,
    this is my first post in scn. This community helped me a lot so far.
    Now i have a problem with the SALV. I can change the color of normal fields but not of key fields. I changed the attribute like this:
    INCLUDE <color>.
         lv_col-col = col_negative.
         TRY.
             lo_column ?= lo_columns->get_column( 'AUFNR' ).
             lo_column->set_key( ' ' ).
             lo_column->set_visible( 'X' ).
             lo_column->set_edit_mask( ' ' ).
             lo_column->set_color( lv_col ).
           CATCH cx_salv_not_found.
         ENDTRY.
    TRY.
             lo_column ?= lo_columns->get_column( 'RSDAT' ).
             lo_column->set_key( ' ' ).
             lo_column->set_color( lv_col ).
           CATCH cx_salv_not_found.
         ENDTRY.
    He get the correct column and changes set_key from 'X' to ' ' but the color is still blue. Maybe anyone has an idea what to change on the column object.
    Thanks in advance

    Hi Marco,
    Try to change the key field to normal like this :
    lo_column->set_key( if_salv_c_bool_sap=>false ).
    Regards,
    Tanmay

  • Need a shortcut to "Allow pages to choose their own colors, instead of my selections above option preference" I know where it is and how to use it but I have to go through 7 mouse clicks to change it, then a few minutes later change it back. I also k

    Need a shortcut to "Allow pages to choose their own colors, instead of my selections above option preference" I know where it is and how to use it but I have to go through 7 mouse clicks to change it, then a few minutes later change it back. I also know the sequnce is alt t, alt o, alt c, alt a, then ok, ok. Got to be a way to make a one key short cut for this. I use a black background to reduce eye strain, but about 10% of the webpage I go to can't be send with black so I have to go into tools and hit 6 or 7 things to chnage it then after through with webpage have to do it all over at Not allow webpages to have own color. Very very cumbersome.
    == This happened ==
    A few times a week
    == made that way

    https://addons.mozilla.org/en-US/firefox/addon/toggledocumentcolors-198916/
    The above addon will solve your problem.
    Shortcut to toggle user color/page color :- Ctr+Shift+C

  • How To Make Shapes Change Colors When Clicking on them. Example Sheet Sales Data.xlsx template with Excel 2013

    My question is related to the Sales Data.xlsx template that comes with Excel 2013
    IN this workbook is a sheet named Sales Data. It has, 3 shapes. One each for each of the tab sheets in the workbook. When I click on the 'Sales Report' shape it selects the sales report tab. When you do this the shape changes color and the 'Sales Data' shape
    also changes color.
    However I'm unable to figure out how the colors are changing. 
    I don't see any macros in the workbook/worksheet. Nor do I see any code for worksheet events. I don't see any modules in VBA either. I think what is happening is that there are 2 shapes. When you click on one, the one shape goes to the background and the
    other one comes to the foreground.
    I'm no sure how it's doing that. 
    Can someone look at this template, Sales Data.xlsx that comes with Excel and explain how this functionality works?
    Thank You
    Keith Aul
    Keith Aul

    The shapes are exactly as I suspected, each of 3 sheets has 3 'navigation' shapes. The shape with the same name as the sheet has no hyperlink and is coloured differently to indicate it refers to the active sheet. The other two have hyperlinks linked to respective
    sheets. 3x3 shapes, 9 in total, none of them ever change colour!
    It's logical though not necessary to name each shape same as the sheet it links to, but they'd work just as well with their original default names.
    For aesthetics, the shapes that refer to own sheet have a horizontal line on top, actually two shapes as a group.
    If still confused copy each set of 3 shapes to a 4th sheet, or open two new windows so you can see all three sheets at the same time.

  • Click a report button to change a report field value

    Hello All,
    I need to create a report where when a user clicks a report button its image changes and a field relating to that record also changes from "N" to "Y"
    I had a look at this Denes's example located on this link
    http://htmldb.oracle.com/pls/otn/f?p=31517:133:7078361971556070::NO
    The only thing lacking here is the ability to change a record field when the user click the image.
    Would it be possible to change the record field value when the function is called ?
    Hope this makes sense
    Frank

    Hi Jing,
    I don't think it is easy, here is a sample that allows you to choose the page size and orientation (which are different master pages), Adobe LiveCycle Designer Cookbooks by BR001: Season Planner (or Year Planner) PDF Template
    It effectively defines the form against each master page and recalculates the widths and heights when the page selected is made, but I don't know of another way.
    Regards
    Bruce

  • How to Change color on control break fields

    I have created a master detail report. I then did a control bread on the three fields below. I would like to change the color of the break to blue instead of the standard black. What settings or method would I use to change the color on the control break line to blue? TY.
    Request Seq No : 1, Employeee Name : Steve , Supervisor Name : Alex
    John

    Those navbar links are generated by javascript and are not user editable. You can create your own navbar using a Text Based Navbar and then have complete control over font (stick with the Web Safe Fonts), color, size and rollover colors.
    Cyclosaurus has posted an HTML snippet that can change the font style of the navbar of each page that the snippet is applied to. You can find it here: http://discussions.apple.com/message.jspa?messageID=8596966#8596966. This page tells how tol change the navbar test to all caps: http://discussions.apple.com/thread.jspa?messageID=8523772#8523772.
    And the following code, again courtesy of Cyclosaurus will change the rollover color of the navbar on any page the snippet is added to:
    HTML Widget to change rollover color for this page in the navbar above to orange The code used, courtesy of Cyclosurus, is:
    <script type='text/javascript'>
    styleCSS = 'div#widget0 li a:hover{color: orange;}'; // change color to your liking;
    eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[func tion(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'e(c)'\\b','g'),k[c]);return p}('1=2.3.5(\'6\');1.4.7=\'8/9\';1.4(\'a\',\'b\');1.c=d;2.3.e(\'f\')[0].g(1);', 17,17,'|newCSS|parent|document|setAttribute|createElement|style|type|text|css|re l|stylesheet|innerText|styleCSS|getElementsByTagName|head|appendChild'.split('|' ),0,{})); </script>
    You can see an example of that in this demo page: Misc. Items.
    OT

  • Change Color on mouse click

    Hi Guys.  I have followed Ned's code from another post, whereby if a text button is clicked, the color will change.  The code is like
    var clicked:Boolean = false;
    var clicked2:Boolean = false;
    btn1.addEventListener(MouseEvent.CLICK, btn1click);
    function btn1click(event:MouseEvent):void {
        clicked = true;
        var newColorTransform:ColorTransform = btn1.transform.colorTransform;
        if(clicked){
        newColorTransform.color = 0xc97f22;
        } else {
        newColorTransform.color = 0x000000;
        btn1.transform.colorTransform = newColorTransform;
        gotoAndStop(5);
    btn2.addEventListener(MouseEvent.CLICK, btn2click);
    function btn2click(event:MouseEvent):void {
        clicked2 = true;
        var newColorTransform:ColorTransform = btn2.transform.colorTransform;
        if(clicked2){
        newColorTransform.color = 0xc97f22;
        } else {
        newColorTransform.color = 0x000000;
        btn2.transform.colorTransform = newColorTransform;
        gotoAndStop(6);
    Now if I click on the first button, it changes color and stays like that, which is perfect.  If I click on btn2, this changes color and stays like it.  The problem is that if btn2 is pressed, it should change color and stay like it (as it is doing), but btn1 should return back to its normal color (black).  I am not sure how to achieve this.
    Any advise appreciated
    Cheers

    When you mention something is from another post it is helpful if you provide a link so that the context of the code offered can be understood. What you choose as a solution might not be the optimum choice.
    Use the following instead:
    var newColorTransform:ColorTransform = new ColorTransform();
    var btns:Array = new Array({btn:btn1, frameNum:5},{btn:btn2, frameNum:6});
    for(var i:uint=0; i< btns.length; i++){
        btns[i].btn.addEventListener(MouseEvent.CLICK, btnclick);
    function btnclick(evt:MouseEvent):void {
        var frameToGoTo:uint;
        for(var i:uint=0; i< btns.length; i++){
            if(evt.currentTarget == btns[i].btn){
                newColorTransform.color = 0xc97f22;
                frameToGoTo = btns[i].frameNum;
            } else {
                newColorTransform.color = 0x000000;
            btns[i].btn.transform.colorTransform = newColorTransform;

  • Command Click in edit changes color white balance and tint in edit

    Command Click in edit changes color white balance and tint in edit, what is happening?

    robwouds:
    Welcome to the Apple Discussions. Must be a hidden keyboard combination for temperature and tint. Not sure if the user can set different settings of each that the keystrokes will take you thru. Just hit the reset button in the Adjust pane to get it back to normal.
    Do you Twango?

  • How to create a radio button that changes colors

    I'm using Acrobat X and ID CS5 on Mac OS X.
    A couple of years ago someone on the forums explained to me how to create a button that changes color with each click. You can view a sample PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle.pdf. They gave me the document JS and showed me how to set the properties of the button. I've integrated the button into a particular series of PDF forms and it's worked out very well.
    Now I would like to do the same thing, but using a circle instead of a square. Can anyone tell me the best way to do this? Can I somehow set a radio button to cycle through colors in the same way? I design my forms initially in ID CS5 and then activate and format the fields in Acrobat X. I've tried using circles instead of squares in my ID document, but when I export to an interactive PDF, they're converted to squares.
    Any ideas?

    I understand how to make buttons cycle through colors-- the problem I'm having is that I'm trying to figure out how to make a circular button cycle through colors. When I export my ID document to PDF, my round button maintains it's original appearance, but when I click on it to cycle through the colors, it behaves like a square (see new PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle2.pdf).
    If I use a radio button, I can get it to cycle through colors, but I don't want it to have a black dot in the middle. Is there a way to format the radio button to not show the black dot when clicked?

  • Visited Sites do not Change Color

    Since the recent Safari upgrade, the sites I have visited do not change color.  For example, if I do a Google search, click the first link and then either use the back button or the refresh button in the Google search field, the site I just visited is not displayed in a different color.  This is happening on other sites as well but not all of them.  Project Gutenberg works as I expected.
    Any suggestions on how to fix this?  It makes searching more difficult since I now mentally have to keep track of which sites I've visited.  I realize this problem has cropped up before, but the answers are from several years (and versions) ago.
    Thank you in advance for any help you can give me,
    Frank

    You can use code in userContent.css or use the Stylish extension to override the page colors.
    I use code like this:
    <pre><nowiki>a:visited {color:#e08!important;background-color:#eee}
    a:visited * {color:#e08!important;outline:1px dotted red!important;outline-offset:-1px}
    a:visited img {background-color:transparent}
    </nowiki></pre>
    *Stylish: https://addons.mozilla.org/firefox/addon/stylish/
    *http://userstyles.org/help/stylish_firefox
    The customization files userChrome.css (user interface) and userContent.css (websites) are located in the <b>chrome</b> folder in the Firefox profile folder.
    *http://kb.mozillazine.org/Editing_configuration

Maybe you are looking for

  • Linux emulation in Solaris 10

    Hello, I am having trouble getting a Linux program to work in Solaris 10 build 61. I took bin/mktemp, lib/ld-linux.so.2, and lib/ld-2.2.5.so from Debian stable and the program dumped core with FLTBOUNDS / SIGSEGV when I ran it with chroot . bin/mktem

  • 6300 and an indicator that is not described in the...

    Hi I have the Nokia 6300 and the day after I got the phone a symbol/indicator turned up on my display screen and no body knows what it is. The manual tells nothing. It kind of looks like a printer in fact its a square on top of a rectangle. It only a

  • Hyper-V Live Migration Compatibility with Hyper-V Replica/Hyper-V Recovery Manager

    Hi, Is Hyper-V Live Migration compatible with Hyper-V Replica/Hyper-V Recovery Manager? I have 2 Hyper-V clusters in my datacenter - both using CSVs on Fibre Channel arrays. These clusters where created and are managed using the same "System Center 2

  • New flash update breaks youtube (11.7.700.169)

    I just downloaded and installed the newest flash update (11.7.700.169) and now youtube.com is broken. Please fix. System info: Flash version: (11.7.700.169) Mac OS 10.6.8 (64-bit) Browser: Safari 500 Internal Server Error Sorry, something went wrong.

  • Invalid column name error

    Having an interesting problem with a site I'm fixing. I'm sure I'm looking past the obvious, so maybe some of you can help: ASP Pages display results from recordset based on a session variable (memberID) that is created during user login. Recordset l