Editable textbox with text from switch statement.

I'm trying to make form that has text fields that get pre-populated based upon dropdown choices. I tried to use else/if statements, but I was advised to use a switch statement.  The problem is that I NEED the end-user to be able to make changes to the textbox that is created/generated from the switch statement.  For example I have the code below.  It will switch the text in the textbox perfectly when I choose different items in the AddtlServicesDrop1 box.  But I need the end-user to be able to add more info to the "promotes roots" text....but everytime I type text into the box it disappears when a new cell/item is clicked.  Can anybody give me some help? 
//Custom Calculate script 
(function () { 
    var Description1 = getField("AddtlServicesDrop1").value; 
    switch (Description1) { 
    case "Soil Test" : event.value = "To apply the right kind and amount of fertilizer. I need to test your soil. Our soil test will determine pH and nutrient needs (lime, sulfur, phosphorus, & potassium)."; break; 
    case "Heavy Core Aeration": event.value = "Promotes roots"; break; 
    case "Seeding": event.value = "Thin spots"; break; 
    case "Lawn Disease Control Program" : event.value = "Prevent Disease"; break; 
    case "Perimeter Pest Control": event.value = "Prevent Ants"; break; 
    default: event.value = ""; 

Use equals instead of ==
String temp = textFieldCountry.getText();
if (temp .equals("Netherlands"))
return true;
else
return false;

Similar Messages

  • How do you edit photos with photoshop from the new  Photos app?  The edit in external editor menu item seems to be gone.

    How do you edit photos with photoshop from the new  Photos app?  The edit in external editor menu item seems to be gone.

    Tell Apple what additional features you want in Photos via both http://www.apple.com/feedback/macosx.html and http://www.apple.com/feedback/iphoto.html  since they don't have a feedback page for Photos as yet.

  • Problems with text from Word, even WordPad - erased spaces  :(

    Hi
    I have Director 11 and I think this is my last project with it, so I don't consider an upgrade to 11.5 since I don't see any future.
    I have a serious issue when I paste text from Word or even Wordpad. Sometimes it erases spaces between words.
    I want to keep some formating because I have a lot of text so pasting from Notepad it's excluded.... too much work
    Any ideas?
    Thanks.

    Director 11 was a pathetic, miserable thing.  Director 11.5 fixed many (not all, but many) of the problems introduced in D11, including a great deal of the text related issues that came with the new text engine.  I do not know if D11.5 will work better in your specific instance, but it is useable.  In my opinion, D11 is not usable, and never should have been released to the world.
    Anyway, I would recommend that you download the free trial version of D11.5 and see if it works better.  Beware though, that you need to do it on another machine that does not have D11 licensed on it.  It will probably overwrite the D11 installation, so you do not want to do that if you do not plan on purchasing D11.5.

  • Version 26 has problem with text from tabs overspilling on right

    In Firefox 26, when opening / closing tabs (when having quite a few tabs open) results to text from the tabs (prob rightmost one) to overspill into the small icons beyond the tab bar (e.g. the ">", "+" icons / buttons), have not seen the problem in any versions before.
    I can send a small image which illustrates the problem.

    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.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can't attach a screenshot to the first post that starts a thread, but you can do that in subsequent replies.

  • Name Exported PDFs with text from a frame on each page

    Does anyone have an idea how to do the following
    I plan on creating a document of say 100 pages. On each page will be a photo of a product and some text frames. In one of the frames will be the product's SKU code - which we will enter manually.
    What I want is that we can then export each page as a separate PDF and the filename of each PDF will be taken from the SKU code present in the text frame with .pdf appended.
    Has anyone done something like this?
    Thanks

    Ask in the Scripting forum... InDesign Scripting

  • (Bash) How to set a variable with text from a file? [SOLVED]

    I'm having a little problem.
    I have textfile with a single line of text. What I want to do is set a variable with that line of text. How do I go about doing that?
    A simple var="text" wont work in this case, since the text in the file changes with another script of mine.
    Thanks in advance.
    Last edited by Aziere (2007-03-27 09:07:03)

    if you have a file with more than one line but you only want the first line you could use 'head'
    VAR=`head -n 1 file`
    Last edited by SiD (2007-03-27 05:58:33)

  • Fill textBox with data from clipboard

    Hi:
    Here's my trouble.
    I have a formulary with 3 textBoxs. 2 of them are written by the user, but the 3rd must be written with a String that is received from bluetooth and stored in the clipboard (this is no a must, the objetive is to fill the textBox, not to store things in the clipboard).
    How can I do this?
    Thanks for your help!

    No, i already know how to work with the clipboard.
    The point is how to write in the textBox from a desktop app.

  • Choosing different methods from switch statement

    I've written 3 different methods that solve the same problem (a Fibonacci sequence) and want to combine them. So, first user inputs the n as number of Fibonacci numbers, and then chooses m as either 1-recursion, 2-iteration, or, 3-constant.
    int m = ... //user input
    int[] method = new int[11]; // array holding for 0<=n<=10
    if (m>=1 && m<=3) {
        switch(m) {
         case 1: method[m] = recursion(n);
                             break;
         case 2: method[m] = iteration(n);
                             break;
         case 3: method[m] = constant(n);
                             break;               
    for (int i=0; i <= n; i++) {
         System.out.print(":");
         for (int j=1; j <= method[m]; j++) { // how to put "i" into chosen method's parameter ("n")
              System.out.print("*");
         System.out.println();
         Edited by: courteous on Nov 9, 2008 2:35 AM

    I've written 3 different methods that solve the same problem (a Tribonacci sequence: 0,1,1,2,4,7,13,24,44,... sum of previous three numbers) and want to combine them. So, first user inputs the n as number of Tribonacci numbers, and then chooses m as either 1-recursion, 2-iteration, or, 3-constant.
    Either of these three methods outputs ":" and then the number of "*" that represent the Trib. number. For example:
    :                     //Tribonacci(0)=0
    :*                     //Tribonacci(1)=1       
    :*                     //Tribonacci(2)=1
    :**                     //Tribonacci(3)=2
    :****                     //Tribonacci(4)=4
    :*******                     //Tribonacci(5)=7
    :************                     //Tribonacci(6)=13Here is the relevant part of code:
    int n = ... //user input
    int m = ... //user input
    int[] method = new int[11]; // array holding for 0<=n<=10
    if (m>=1 && m<=3) {
        switch(m) {
         case 1: method[m] = recursion(n);
                             break;
         case 2: method[m] = iteration(n);
                             break;
         case 3: method[m] = constant(n);
                             break;               
    for (int i=0; i <= n; i++) {
         System.out.print(":");
         for (int j=1; j <= ??? ; j++) { // how to put "i" into chosen method's parameter ("n")
              System.out.print("*");
         System.out.println();
         The problem is with the inner for loop, that I don't know how to formalize the condition part. If, instead of "???", you would write "method[m]",
    for (int j=1; j <= method[m] ; j++) and the user input would be "n=2" (two Trib. numbers, starting with 0; thus, the outer for loop prints ":" three times) and "m=2" (method "2-iteration"), output would be:
    :        //missing star (*)
    How to write condition that would, while using chosen method, simultaneously insert "i" as (chosen) method's parameter. That would make the condition for (int j=1; j <= ??? ; j++) increasing, and producing the right amount of stars (*)?
    /* Sorry, for lengthy post, but I must make it as clear as possible*/
    Peter, method would just invoke non-existing methods (there is only one full, either method[1] (recursion), or method[2] (iteration), or method[3] (constant)), so this won't work (I guess).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Unable to click elements in menu bar when toggling (with alt) from hidden state

    I've put few elements in normally hidden menu bar, like "RSS icon" or "Downloaded files icon". After showing menu bar they look properly (e.g. icons highlight on mouse over), but won't execute action - menu bar will hide upon click on them.
    I've also put search bar there, selecting items from it works properly, after opening select search engine all other elements start to work, yet, after executing an action menu bar won't hide again until some menu is opened and closed. At the moment I'm using FF 5.0, but problem exists in 6.0 as well

    *bug541844(fix with autohide menubar): https://addons.mozilla.org/firefox/addon/bug541844fix-with-autohide-/

  • Exported graphics with text from Illustrator - text is very fuzzy

    I am creating graphics in Adobe Illustrator CS3 on a Mac running OSX. The graphics consist of a pie chart and extra explanatory text below it. I do not have the option of doing the text part in another program.
    When I exported as a jpg, put the graphic into Dreamweaver, and then put it onto the web, the text was fuzzy. When I used the Save to Web options, it was even fuzzier.
    I use the default settings for both the jpg export and the Save to Web (gif and jpg) because I'm not sure what they all mean.
    Any help would be appreciated.
    Thank you.

    Jacob,
    I looked at anti-aliasing and it was already checked for everything I've tried. I looked at the Save for Web gif file settings, and am not sure I understand what you are suggesting. Transparency has been checked for everything I've done. No dither is selected for the setting under that (rather than Diffusion, Pattern, or Noise Transparency Dither) - I don't know what that means.
    I tried both jpg and gif using Save as for the Web. For jpg, I used maximum resolution, Progressive and ICCProfile were not checked, optimized is checked, quality at 100, blur at 0, matte is empty, and under Image Size, anti-aliasing and proportions settings are both checked and clip to artboard is not.
    For gif, I used mostly defaults: selective, diffusion, transparency checked, No transparency dither (as mentioned), interlaced is not checked, image size anti-aliasing is checked and clip to artboard is not. Lossy is 0, colors 256, dither 100%, matte is blank, Amt 10% is grayed out and unchangeable, and web snap 0%. I don't even know what most of that is for.
    When I did all of this, the images were more fuzzy than the one where I just exported from Illustrator as a jpg, which is also too fuzzy.
    The only thing that comes to mind immediately is would this work better if all of the text were changed to outlines? And does anything else come to you that I may have not done?
    Also, just in case you see my screen name, I changed it in between my post and this reply. msbnbb and Early Music Lover are both me.
    Thanks for your help,
    Marcy

  • Ever since the last upgrade, when I tap a cell to highlight it or add text a box pops up with text from other cells. How do I disable this feature?

    How can I disable a pop up box that appears whenever I tap a cell in numbers for ios? This annoying feature accompanied the last upgrade. When I tap a cell to highlight it, a box pops up with all the words typed in the adjacent cells so I can populate the cell with one of them, but I neither need nor want the suggestions.

    Hi debdor,
    I don't know where to find the setting in Numbers for iOS, but in Numbers for Mac OS X it is under Menu > Numbers > Preferences > General > Editing.
    Show suggestions when editing table cells.
    As you can see, I don't use it.
    Regards,
    Ian.

  • How do I save a photo edited in photoshop with text added to a jpeg file that will create a poster quality image?

    How do I save an edited photo with text in a jpeg format? 

    You can't.
    The JPEG format is a lossy format and it also does not support layers.

  • Editing an iWeb site from a second Mac

    I recently purchased ILife 06 and have begun switching my existing web sites on my .mac account to be on iWeb format but i have a few questions:
    1. I published the iWeb site with my iBook but I also want to populate and edit it with images from i Photo on my iMac - can I work with two Mac's???
    2. My slide show pictures are very small on iWeb slide show compared to what I get on the slide show on my now old Mac Web page.Comments???
    Thanks in advance for the help.

    A slick way to do it is to store the domain file on a usb flash drive (stick) and double click it from there. That way you can plug it into whatever computer running iweb you wish and update it.
    Always remember to back that file up no matter what you do. If you lose it for any reason it can't be restored from the published files.
    good luck

  • Copy text from table to table issue

    Using CS6 on PC Win 7 64bit
    not noticed this before probably becasue I usually copy in from Excel or Word docs, but when I copy text from one table to another in a document  its copying it as a nested table,
    if I just copy a single  cell then thats ok but anything else its placed as a table within the target table.
    Probably something really obvious I've overlooked, but its driving me nuts
    Have looked in  prefs and Clipboard  is set for just text, apart from that I cant see anything
    thanks for any help you can give

    Hi Bob
    thanks for that speedy reply.
    I've just been doing some testing and I'm not sure if the results I'm getting are how things should be.
    I just called up one of my recent excel tables and did what I usually do, highlight from the top left cell to the bottom right hand corner cell, Ctrl-C
    Excel table is always 11 column but  the number of rows varies from week to week, from 50 or so to 250.
    Opened an ID table  template I use which width wise is  the same amount of columns as my source excel file 11 columns, but only a few rows.
    Place the cursor and highlight the first row in ID  Ctrl-V,  table is filled and it auto inserts more rows to the limit of the object box  and then I just drag the table down to fill the page and then just click and drag the loaded cursor to create more table space on the next page if needed, nice and simple.
    Just opened a new  table with 6 rows and 4 columns
    and tried to paste into a table with 2 rows and 4 columns expecting it to automatically fill and give me the overfill red icon on the frame but it doesnt
    but it does with text from outside of ID, I just tested it, it automatically fills all the table and adds rows until the object fram is ful and then I can just use the overfill facility to increase the table size
    Seems odd that this only works with externally copied material

  • Can ipad 4, purchased from the States be used in Singapore?

    I am planning to purchase a ipad 4 (Wifi + Cellular)  from the states, to singapore. Wondering if it supports the local teleco Microsim, such as Singtel. Or if  "Unlocking" of the ipad is required, before it can be used in SG?

    I am sure WiFi and 3G will work.
    You can check the Singapore specs here with those from the States:
    http://store.apple.com/sg/browse/home/shop_ipad/compare
    http://www.apple.com/ipad/compare/

Maybe you are looking for