Trying to do an 'if' function need help

I have four values that I want to input into a field. What I am trying to make happen is when you type in a letter, that text field will then highlight or fill to a certain color. Can anyone help me? And I want to have four values in it. The values would be "G" "R" "Y" and "0". If I type in "G" I woud like the field to fill/highlight green. I am not good at scripting. any help would be amazing.

I'm not sure if I understand you right.
Here is a script that check if you leave the field which entry the user makes.
If the entry is a "G" the field will be filled with color.
You have to use this script in the change-event of the script editor. This allows to entry only G or R or Y or 0.
if(xfa.event.newText.match(/[^GRY0]/))
xfa.event.change = "";
And this script you have to use in the exit-event of the script editor. This checks if your entry is a "G".
if(this.rawValue == "G")
    Textfeld1.fillColor = "245,245,0";
}else
    Textfeld1.fillColor = "255,255,255";
The script editor you will find about "window".
Hope it will helps you,
Mandy

Similar Messages

  • My ipod touch (2nd generation) is stuck on the usb to itunes screen.  I have NOT jailbroken it, and i have alsop tried restarting numerous times. I need help, soon!

    My ipod touch (2nd generation) is stuck on the usb to itunes screen.  I have NOT jailbroken it, and i have also tried restarting numerous times. I need help, soon! Itunes on my computer works about 50% of the time, so i feel lost!

    Download RecBoot and see if you can kick it out of recovery mode.
    Basic troubleshooting steps. 
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G + 120G OCZ Vertex 3 SSD Boot HD 

  • Ok so I have a free standing iSight Cam, is it possible to use it with my white MacBook ? and if so how do I go about it ? I've tried researching for updates, drives but need help.

    Ok so I have a free standing iSight Cam, is it possible to use it with my white MacBook ? and if so how do I go about it ? I've tried researching for updates, drives but need help. Can someone give me some direction ?

    jpatricio787 wrote: ... is it possible to use it with my white MacBook ?...
    OK so yes, but if, and only if:
    (1) your MacBook has a Firewire port (not all do)
        - and -
    (2) your old external iSight camera works (not all do)
        - and -
    (3) your MacBook is working properly.
    If you are not certain whether your MacBook model has Firewire, you can search MacBook Technical Specifications for your model.  Alternatively, check the  User Guide Manual that came with your MacBook for the information you need to be certain.
    If you are not certain that your old external iSight camera works, you can test it using the suggestions in this link.
    jpatricio787 wrote: ... if so how do I go about it ? ...
    Follow the instructions in your iSight User's Guide to connect and turn on the iSight.  Then launch the Apple app you want to use with your iSight.  If you need more information about using an app, search for "camera" (without the quote marks) in the Help menu choice for the app.
    jpatricio787 wrote:... Can someone give me some direction ?
    If you need more direction, post back the specifics of what you still need.  We will offer further direction based on the details of your reply.
    Message was edited by: EZ Jim
    Mac OSX 10.9.3

  • HT4972 Im trying to download ios 5. Need help.

    Hello. I need help. I'm trying to download the latest version of itunes to my phone.

    To update from iOS 4 to iOS 5... See Here...
    http://support.apple.com/kb/HT4972
    If you already have iOS 5... See Here...
    How to update your iPhone, iPad, or iPod touch

  • I have tried to upgrade my iPod touch , and cant even remember to which iOS  , and it didnt respond with the upgrade and does the loading logo until the battery life is gone. I tried restarting it doesnt work. NEED HELP

    I have upgraded my iPod touch and it didnt respond to the upgrade. Cant remember which iOS i was upgrading but when i try to switch it on the apple logo comes up but than it just goes to the loading logo until the battery life is gone. I have tried restarting it , that doesnt work. I need help i am lost without my ipod please help. Any ideas besides restarting it ?

    Try:                           
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • Help, I am killing myself trying to do this and I need help ASAP

    I need help with this program it has to act like a cash register. The user will input an items price and then their payment. It will tell you the change and then tell you what kinda of change to use, see example below:
    Use JOptionPane to take inputs from the user and display the results.
    Example:
    If the user enters
    Amount Due = 5.52 // First Input from the User
    Amount Given = 10.00 // Second Input from the User
    Calculate the Balance Due
    Balance Amount = $ 4.48
    and display the balance due in denomination as (The following four lines will be ONE Output to the user)
    $1 bill = 4 (4.00)
    Quarters = 1 (0.25)
    Dimes = 2 (0.20)
    Pennies = 3 (0.03)
    This last part, where you display the change that will be given back, ie: how many quarters, dimes, nickels, pennies is the part I am having problems with.
    Can some one help? Please pardon my coding abilities, I am still learning how to do this and would really appreciate any help you can with my program.
    Thanks in advance.
    import javax.swing.*;
    import java.text.*;
    public class CashReg
    { //Start
    public static void main (String [] args)
    { //Start Main
    int count = 0;
    char c1 = 0;
    String price = null;
    String payment = null;
    String change = null;
    boolean correct = false;
    while(!correct)
    { //Start Loop
    price = JOptionPane.showInputDialog (null,"Enter the amount of the item for purchase");
    if (price.length() < 1) //Loop
    JOptionPane.showMessageDialog (null, "You did not enter a purchase amount, try again please.");//Error message
    payment = JOptionPane.showInputDialog (null,"Enter your payment amount.");
    if (payment.length() < 1) //Loop
    JOptionPane.showMessageDialog (null, "You did not enter a payment amount, try again please.");//Error message
    else
    correct = true; //Boolean to confirm that there are enough characters
    for (int i=0; i<price.length(); i++)
    if (Character.isUpperCase(price.charAt(i)))
    count++;
    } //End loop
    // response = price - payment;
    JOptionPane.showMessageDialog (null, "You item costs "+price+" and you payed "+payment+" and your change will be "+change);
    System.exit(0);
    } //End Main
    } //End

    OK, thanks for your help, but I need some more. I have the program running and showing the amount of change that is going to be returned. But I don't know how to display the kind of change. AKA, quarters, dimes, nickels and pennies. I am a programming idot, my teacher is letting us twist in the wind. He is not explaining the concepts behind any of this. You are saying the word "logic" and I don't know what that means. This assigment is due Monday, I just need some help with the last part. How to show the change. I am just plain lost. please help.
    import java.text.DecimalFormat;
    import javax.swing.*;
    import java.text.*;
    public class CashReg
    {     //Start
         public static void main (String [] args)
         {          //Start Main
              int count = 0;
              char c1 = 0;
              String price = null;
              String payment = null;
              String change = null;
              boolean correct = false;
         while(!correct)
         {          //Start Loop
         price = JOptionPane.showInputDialog (null,"Enter the amount of the item for purchase");
              if (price.length() < 1)     //Loop
                   JOptionPane.showMessageDialog (null, "You did not enter a purchase amount, try again please.");//Error message
                   payment = JOptionPane.showInputDialog (null,"Enter your payment amount.");
              if (payment.length() < 1)     //Loop
                   JOptionPane.showMessageDialog (null, "You did not enter a payment amount, try again please.");//Error message
              else
                   correct = true; //Boolean to confirm that there are enough characters
    for (int i=0; i<price.length(); i++)
              if (Character.isUpperCase(price.charAt(i)))
              count++;
         }     //End loop
    //     response = price - payment;
    float fPrice = Float.parseFloat(price);
    float fPayment = Float.parseFloat(payment);
    float fChange = fPayment-fPrice;
    DecimalFormat df = new DecimalFormat ("#.00");
    JOptionPane.showMessageDialog (null, "You item costs "+price+" and you payed "+payment+" and your change will be "+ df.format (fChange));
    This is where I don't know what to put
         System.exit(0);
         }     //End Main
         }     //End
    I am begging for help.

  • Can anyone help me, my mac book pro wont stop loading on the password screen. ive tried everything but nothings working! need help ASAP

    need help with MAC Book Pro! stuck on loading the password screen!

    Do you mean after you log in, it just gets stuck?
    Do the #6 Step here to reset your User Permisisions and see if that works.
    Step by Step to fix your Mac

  • HT201401 okey so i have an iphone4 and my camera isnt working at all i tried front and back screen  still black... it only works when im at my nessages.. but my frony dont. i have tried everything... please i need help.

    okey i have tried calling apple support no one will help me i stayed on the phone waiting an HOUR!! i tried turning my phone off and restarting it.. deleting pictures!! everything!!

    Sounds like your battery is not taking a charge, I know it shows full with you plug it in.  Try plugging it into a wall socket for a few hours and see if the iPod will work on battery power. 

  • I bought a SDHC card trying to put music on it need help

    need help putting music on a SDHC card

    Copy and paste or you need to be more specific about the trouble you are having. By the way, where did the music come from?

  • Lost Itunes after trying to install new version I need help....

    I tried downloading the new versions of Itunes and my computer went nuts. I totally lost itunes and I keep gettign the following message even after I tried deleting all my itunes associated files:
    [img]http://thumb5.webshots.net/t/60/660/5/63/86/2995563860033703545ixjQRz_th.jp g[/img]
    Can somebody help me? What do I need to do?

    The screenshot is too small for me to read ... could you post back with the text on it written in a reply for us?

  • Trying to upgrade OS X and need help

    I have a 1.5 Ghz PowerPC G4 with 1 GB SDRAM with Mac OS X 10.3.9 and I am trying to upgrade the OS but am having problems. I have tried to install 10.4.7 and when I restart the computer an error screen comes up. Can anyone help me ?

    Hi presston,
    First of all, Welcome to the  Discussion Forums!
    This may be a stupid observation...but...you mention that you tried to install 10.4.7....which led me to think that you might be trying to download and "update" the software using the 10.4.7 Apple download. If you are new to Macs, perhaps a Windows switcher, you might not be aware that you need to purchase full retail install disks to upgrade from one full OS version to the next ie. 10.3 Panther to 10.4 Tiger. Point updates to the OS such as 10.3.x-10.3.9 are free updates via Apple Downloads as are 10.4.x-10.4.12 etc.
    See: "Software update, upgrade--what's the difference?"
    When I noticed that you mentioned the specific "point" update to 10.4 (.7) I thought there might be the outside chance that this might be the problem. This is a common mistake that many users make so I just wanted to mention in case you were not aware.
    My apologies if that is not the problem and hence it is probably as Tom suggests that you are using the wrong type of disk to install,
    littleshoulders

  • Trying to reactivate cs6  adobe is not allowing my serial..the computers previous activated are stolen and destroyed..trying a new computer now and need help

    please help trying to reactivate on another computer and adobe is saying this number i already registered,but the # is not showing in my account..Like i have proof of purchase and serial but adobe is saying" I dont knw what you talking about" .Its like making a purchase from a street dealer with stolen goods...whats the prob?

    Who were you talking to at Adobe? You'll have to get help from web chat since serial number issues can't be handled in a public forum. Here's a link:
    Adobe ID, sign in, and account help
    If you're not happy with the agent you're talking to, insist on chatting with a supervisor.

  • Black Screen on iMac 27" Mid-2010 - Tried many fixs, got no sucess, Need help

    Hello, ive been trying to install windows 7 x64 for the past few days.... but i cant pass the black screen after the installation is complete
    I already did several searchs on this subject, i read this article http://support.apple.com/kb/TS3173 but got no sucess doing exactly what is asked.
    Also i tried other possible solution that i found out that was using Mac Fuse to search for a .sys file inside the windows partition and erase it but i couldnt found these file either..
    So im out of possibilities now and dont know what to do, how can i install windows 7 x64 via bootcamp on my iMac?
    I can install windows but on the last restart to initialize windows after all instalation it gets on the black screen with the _ on the left upper corner blinking...
    My imac is 27" Mid-2010 model
    Any help would be aprecciated
    Thanks

    PierrotMobile wrote:
    I have purchased an IMAC 27 mod 2010 and I would like to install Windows 7 with Bootcamp.
    I've tried everything from all sources infos. Impossible to install.
    After last screen on windows install, when desktop is created for first user and last boot ... black screen with blinking cursor.
    I've been able to run this install from VMWARE from OSX. I've tried to install last version of ATI driver, bootcamp 3.2 ... nothing work.
    I'm totally lost from 2 weeks now.
    I could I proceed to boot windows 7 on I IMAC ?
    Please help
    This is an old problem I once ran into, but it's completely unrelated to SP1 which is the purpose of this thread.
    Here is the solution:
    http://support.apple.com/kb/TS3173

  • My Ipod touch has a blank screen and will not turn on. I have chaged it for a hour and tryed troubleshooting but nothing works. i need help getting this to work

    My ipod touch has a black screen and will not turn on. i have charged my ipod and tryed troubleshooting but nothing seems to work. what can i do to have my ipod turn on again?

    See Here...
    Frozen or unresponsive iPod touch
    Try this First... You will not lose any Data...
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...
    http://support.apple.com/kb/ht1430

  • Trying to activate old sim card need help

    i bought another phone today and had an old sim card at home from a 4g phone activated it in the new phone but it wont let me make calls

    Try removing and resetting the Sim card again, if the card is good and for an active Verizon account it should work. If the card does not work visit a Verizon Corp Store and get a new card, there is no charge for the card at a VZW Corp store.

Maybe you are looking for

  • Access - Another Newbie Visible/Invisible Field Q

    With help from Maurice, I now have two fields and associated labels that become visible/invisible dependent on the selection/status of a checkbox.  The visibility is controlled in the AfterUpdate property of the check box.  See previous "field visibi

  • PPOMA_BBP and WBS

    hi, I would like to restricrt the choice of WBS element for a user in the search help in the shopping cart. in PPOMA_BBP, I maintain the PRO attributes with 2 WBS elements. In the shopping cart, I am able to see all the WBS whitout restriction. what

  • Error in the depreciation Run

    dear all i have around 9500 assets in my asset master, when i run the depreciation at the final point it stops giving the error Error(). how can i correct how can i find the actual error?? Thanks & Regards Kanishka

  • Icloud in web browser

    how come my contacts only show up on icloud.com and not in my back up?

  • Itunes doesnt detect iphone

    it used to detect it before i restored my iphone and now it doesnt.. help?