I need help writing an if then statement Java Script.

In the Text Field Properties box I see the Calculate tab where I think that the form can do a logic (IF/THEN) function if I can place the correct Java Script code into the form. Unfortunately; I do not know how to write in Java Script.
     - I have a form with a field identifier called BACompnayAddress (this is the field where they would enter their address).
     - I then have a form field with two radials that says "Is the shipping address the same as the business Address" - "Yes" and "No" (the form identified for the radials is SASame.
What I am trying to accomplish:
     - If they click Yes, I would like the Shipping Address field (field identifiier ShippingAddressAddress) to fill in the information found in BACompanyAddress and if they click No leave the  field blank to be filled out by the person filling out the form.
I appreciate any help.
Thanks,
Brett

If that's what it does, that is exactly what you said it needs to do. You said niothing about what should cause it to go back to frame 1.  If you want it to go back to frame 1 with a ROLL_OUT event, then you would add a listener for that. If you want something else to trigger it to go back, then you just need to work that out.
The only time I can see where an if/else would be needed is if you want it to change frames for every rollover such that if it is in frame 1, then go to frame 2, and vice versa the next time you rollover it.

Similar Messages

  • Need help with Replace Metadata then multiple Save script

    I am attempting to create a javascript to run on a folder of PSDs. I need it to:
    1. Replace image Metadata with an existing Metadata Template called "UsageTerms".
    2. Play an existing Action "Prep_PrintRes". (The action sharpens and converts to 8-bit)
    3. Append "_PrintRes" to the filename. (ie OriginalPSDName_PrintRes.jpg)
    4. Save the file as a 12 Quality JPEG to specific folder on my hard drive, "D:/Transfer".
    5. Play an existing Action "Prep_Magazine" (The action resizes, sharpens, and converts to CMYK)
    6. Append "_Magazine" to the filename. (ie OriginalPSDName_Magazine.jpg)
    7. Save the file as a 10 Quality JPEG WITH NO EMBEDDED PROFILE to "D:/Transfer".
    8. Play an existing Action "Prep_Screen". (The action sizes, sharpens, and converts to sRGB)
    9. Append "_ScreenRes" to the filename (ie OriginalPSDName_ScreenRes.jpg)
    10. Save the file as an 8 Quality JPEG to "D:/Transfer"
    If anyone is available to help me get started with this I would greatly appreciate it. I can do a minimal amount of Visual Basic but Javascript is alien to me. Thanks so much!

    Try the following as the custom calculate script:
    // Sum the field values, as numbers
    var sum = +getField("LaborCost").value;
    sum += +getField("MaterialCost").value;
    sum += +getField("EquipmentCost").value;
    // Set this field value
    event.value = sum > 0 ? sum : 0;
    For the other one, change the last line to:
    event.value = sum < 0 ? sum : 0;

  • I need help writing a script that finds the first instance of a paragraph style and then changes it

    I need help writing a script that finds the first instance of a paragraph style and then changes it to another paragraph style.  I don't necessarily need someone to write the whole thing, by biggest problem is figuring how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thanks!

    Hi,
    Do you mean first instance of the paragraph style
    - in a chosen story;
    - on some chosen page in every text frames, looking from its top to the bottom;
    - in a entire document, looking from its beginning to the end, including hidden layers, master pages, footnotes etc...?
    If story...
    You could set app.findTextPreferences.appliedParagraphStyle to your "Style".
    Story.findText() gives an array of matches. 1st array's element is a 1st occurence.
    so:
    Story.findText()[0].appliedParagraphStyle = Style_1;
    //==> this will change a paraStyle of 1st occurence of story to "Style_1".
    If other cases...
    You would need to be more accurate.
    rgds

  • Need help writing small program!

    Hi. I'm learning Java programming, and I need help writing a small program. Please someone help me.
    Directions:
    Create a program called CerealCompare using an if-then-else structure that obtains the price and number of ounces in a box for two boxes of cereal. The program should then output which box costs less per ounce.

    class CerealCompare {
        public static void main(String[] args) {
            // your code goes here
    }Hope that helps.
    P.S. Java does not have an if-then-else statement.

  • Need Help Writing Server side to submit form via API

    Hey
    I need help writing a serverside application to submit
    information via API to a separate server.
    I have a client that uses constant contact for email
    campaigns. We want to add to her website a form taht submits the
    information needed to subscribe to her email list, to constant
    contact via API.
    FORM.asp :: (i got this one under control)
    name
    email
    and submits to serverside.asp
    SERVERSIDE.ASP
    In serverside.asp i need to have
    the API URL
    (https://api.constantcontact.com/0.1/API_AddSiteVisitor.jsp)
    username (of the constant contact account)
    password (of the constant contact account)
    name (submited from form.asp)
    email (submitted from form.asp)
    redirect URL (confirm.asp)
    Can anyone help get me going in the right direction?
    i have tried several things i found on the net and just cant
    get anyone to work correctly.
    One main issue i keep having is that if i get it to submit to
    the API url correctly - i get a success code, it doesnt redirect to
    the page i am trying to redirect to.
    ASP or ASP.NET code would be find.
    THANKS
    sam

    > This does require server side programming.
    > if you dont know what that is, then you dont know the
    answer to my question. I
    > know what i need to do - i just dont know HOW to do it.
    If you are submitting a form to a script on a remote server,
    and letting
    that script load content to the browser, YOU have no control
    over what it
    loads UNLESS there is some command you can send it that it
    will understand.
    No amount of ASP on your server is going to change what the
    remote script
    does.
    http://www.constantcontact.com/services/api/index.jsp
    they only allow their customers to see the instructions for
    the API so i
    can't search to see IF there is a redirect you can send with
    the form info.
    But posts on their support board say that there is.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Need help setting up a Finite State Machine in BlueJ

    Hey all, I joined these forums to hopefully help me catch up with my Java skills. I haven't programmed in Java for almost a year, and the class I'm in now does little for review so I'm rusty to say the least. The assignment we were given recently is to create a Finite State Machine resembling a gumball machine. This are basically the requirements given:
    The operation of the gumball machine is simple. It takes a quarter to get a gumball dispensed. The customer needs to deposit a quarter and turn the crank, and a gumball will be dispensed if the machine contains one or more gumballs.
    Design steps:
    There are a number of states: No_Quarter, Has_Quarter, Gumball_Sold, Out_of_Gumballs
    Create an instance variable to hold the current state and define values for each of the states.
    All the actions that can happen in the system are: insert_quarter, ejects_quarter, turns_crank, dispense_gumball, and refill_gumballs. The action dispense_gumball is an internal action the machine invokes when it reaches the Gumball_Sold state.
    Create a class that acts as the state machine. For each action, create a method that uses conditional statements to determine what behavior is appropriate in each state.
    Write a test program to test the GumballMachine class. You consider not just normal operations i.e. insert a quarter, turn the crank; but also operations such as insert a quarter, eject the quarter, turn the crank. Or what if you turn the crank twice after insert one quarter. Or what if you insert two quarters in a row.
    Now trust me, I'm not asking for someone to come here with a hunk of code and say, ok use this, and it's done. What I'm here for is hopefully someone can walk me through the right thought process of how to implement the states, and where/how to include the actions to go along with the states. We're to use BlueJ to write the code, and I'm still pretty unfamiliar with its arrow system that tells Test Programs to use the linked class(es).
    Thanks for any help in advance, and for what it's worth, speedy responses are especially appreciated!

    Did you upload everything to your server?  Did you perform the compatibility check?
    FormCaptcha’s requirements:
    PHP 4.0 or later.
    GD Library for PHP, version 2.0 or greater (it's installed on most web servers but it may not be enabled).
    The page that processes the form must have .PHP extension.
    Tip: If you want to be sure that your web server supports this captcha tool, then you can download and test our free captcha compatibility check. This is a script that checks if your web server can generate captcha images and perform the captcha validation.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Need help writing a Java rule in PDF Forms

    I have created an invoice for my contractors via "forms", and in turn made each cell either a drop down list or "read only" field so they cannot change the rate of pay, etc.  Here is my issue...My first drop down cell is titled "Job Description".  When the contractor selects one of the 8 dropdown options within the Job Description field, I would like it to automatically fill in the hourly rate that is associated with that particular job description (or skill).  I currently have my "rate" cell as a drop down, and I want to make that a read only, and when you select the A1 position from Job Description, it will populate the "rate" field with the appropriate amount for that A1 rate.  I believe this can be done with writing some Java script, but I have never played with Java and I don't really have the time to teach myself.  If anyone can help with me a quick tutorial, or even the formula I should use, so that I can just plug and play, that would be super helpful.  If this is a time consuming issue, I would be interested in paying someone to do it for me. Thank you!

    Hi George,
    I was able to copy my data over to a fresh document, and now it works just fine....thank you so much for your insight and help!
    I have another question if you have a moment. 
    I am trying to do a simple calculation of start time and end time for my employees.  Do I need to do this via a javascript, and if so, what area in properties of the result field should I copy it to?  for the purpose of the script, the fields are as follows:
    DataField1 = start time
    DataField2 = end time
    DataField3 = total time
    I would like to use the h:MM tt format for my time fields if possible.
    I've attached a link to the file through my dropbox account, and you'll notice that I created three new fields at the top of the invoice just to test the time calculations before i mock up the whole document.
    Dropbox - Contractor Invoice Template (1).pdf
    Any help you can give me would awesome! 
    Thank you!!

  • Need help writing a query for following scenario

    Hi all, I need some help writing a query for the following case:
    One Table : My_Table
    Row Count: App 5000
    Columns of Interest: AA and BB
    Scenario: AA contains some names of which BB contains the corresponding ID. Some
    names are appearing more than once with different IDs. For example,
    AA BB
    Dummy 10
    Me 20
    Me 30
    Me 40
    You 70
    Me 50
    Output needed: I need to write a query that will display only all the repeating names with their corresponding IDs excluding all other records.
    I would appreciate any input. Thanks

    Is it possible to have a records with the same values for AA and BB? Are you interested in these rows or do you only care about rows with the same value of AA and different BB?
    With a slight modification of a previous posting you can only select those rows that have distinct values of BB for the same value of AA
    WITH t AS (
    SELECT 'me' aa, 10 bb FROM dual
    UNION ALL
    SELECT 'me' aa, 20 bb FROM dual
    UNION ALL
    SELECT 'you' aa, 30 bb FROM dual
    UNION ALL
    SELECT 'you' aa, 30 bb FROM dual
    SELECT DISTINCT aa, bb
      FROM (SELECT aa, bb, COUNT(DISTINCT bb) OVER(PARTITION BY aa) cnt FROM t)
    WHERE cnt > 1;

  • Writing an if-then statement

    I would like to write an if-then statement that would hide an element (image of a pause button) when the main timeline is stopped. I have a play forward button that when pressed will switch to a pause button. The same happens for the play reverse button. This way the buttons are like toggles...press once it plays and press again and it stops. I have this working fine, but there are several stop triggers throughout the timeline, and when the animation is stopped my pause/play button will still be in the pause button mode, thus a user will not be able to restart the animation. There are too many of these stop triggers to make it practical to add a hide command to each to hide the pause button (thus making the play button underneath accessable), so what I would love is if I could write a statement that would hide both pause buttons whenever the timeline is not running.
    I need to know the correct way to write the code and where to put it.
    Thanks in advance,
    Greg

    Hi Joel...
    you can view the test site here http://cyclesofyah.com/slider-test_screen-swap-test/
    and you can download the files here http://cyclesofyah.com/chrono/cycles_test.rar
    you won't see much happen until you click on the gear icon. While the timeline is running you can type any number on your keyboard, and it will take you to a stop trigger.
    Thanks

  • Need help writing a script

    I am trying to convert my prcess from DTS to SSIS. I am running this report out of SAP and then using Monarch to put into the correct form, then I am using the DTS to put it into the database on the SQL server.  I am able to get all the other info to
    move out having so much trouble here to get the plant number. The issuse is that it is on top on the page and it will change when a new plant is needed.
    Thanks for any help
    I need help wrting a script that will put that 7010 into a cloumn nnamed plant number.

    To convert from DTS packages to SSIS you can just open the DTS package in a new SSIS project (depends on target SSIS version by using SSDT or BIDS).
    The rest is mechanics how the iteration with SAP is done and may be beyond the scope of this forum.
    Arthur
    MyBlog
    Twitter

  • Need help writing Labview Program!!!!!

    I have a labview project that needs to be finished. I was not the original creator of the program and the guy who created no longer is involved with the project and I am left to finish it. Could you make the final adjustment so I can turn this into my professor and get the final grade. Thanks! Willing to pay! Negeotiable price!!!!!!!!

    Need help completing assignment! Could anyone assist me in this project!
    Attachments:
    dial tone detection.zip ‏1253 KB

  • Need help writing script to change version control for all document libraries in all sites

    Hello,
    I found this script, http://get-spscripts.com/2010/10/changing-sharepoint-list-settings-using.html that
    changes versions control for a document library.  However, many sites have many document libraries with different names.  The script below just changes a the settings to a document library that is named "Shared Documents", but does not
    change one if its named something else.  How can change the script to loop through all document libraries so their settings are changed?
    $site = Get-SPSite http://site
    $listName = "Shared Documents"
    #Walk through each site in the site collection
    $site | Get-SPWeb | 
    ForEach-Object {
    #Get the list in this site
    $list = $_.Lists[$listName]
    #Create a version each time you edit an item in this list (lists)
    #Create major versions (document libraries)
    $list.EnableVersioning = $true
    #Create major and minor (draft) versions (document libraries only)
    $list.EnableMinorVersions = $true
    #Keep the following number of versions (lists)
    #Keep the following number of major versions (document libraries)
    $list.MajorVersionLimit = 7
    #Keep drafts for the following number of approved versions (lists)
    #Keep drafts for the following number of major versions (document libraries)
    $list.MajorWithMinorVersionsLimit = 5
    #Update the list
    $list.Update()
    #Dispose of the site object
    $site.Dispose()
    Paul

    Sorry, I agree. It will update Style Library and other out of the box ones. Include the library titles in a collection and run the update against them provided these libraries are common across all sites. If not, you will have to first get an extract of
    all such libraries in all sites say in a CSV file and then update the script below to refer to the CSV records.
    Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction Stop;
    #List of Libraries to be updated.
    $Libraries = @("Shared Documents","My Document Library");
    $spAssgn = Start-SPAssignment;
    $site = Get-SPSite http://site -AssignmentCollection $spAssgn
    #Walk through each site in the site collection
    $site | Get-SPWeb -Limit ALL -AssignmentCollection $spAssgn |
    ForEach-Object {
    #Enumerate through all document libraries
    $_.Lists|Where{$_.BaseTemplate -eq "DocumentLibrary" -and $Libraries -contains $_.Title}|Foreach-Object{
    #Get the list in this site
    $list = $_;
    #Create a version each time you edit an item in this list (lists)
    #Create major versions (document libraries)
    $list.EnableVersioning = $true
    #Create major and minor (draft) versions (document libraries only)
    $list.EnableMinorVersions = $true
    #Keep the following number of versions (lists)
    #Keep the following number of major versions (document libraries)
    $list.MajorVersionLimit = 7
    #Keep drafts for the following number of approved versions (lists)
    #Keep drafts for the following number of major versions (document libraries)
    $list.MajorWithMinorVersionsLimit = 5
    #Update the list
    $list.Update()
    Stop-SPAssignment $spAssgn;
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • I need help with setting up my Sun Java Studio Creator

    Hello all, i need help with setting up the Studio Creator, i"m new to all that staff so is there anyone to help me just a little with all that if yes email me at [email protected] or get me on AOL Instant Messanger with the screen name: wretch17
    thanks :-)

    Hi,
    Welcome to the Creator community! Thanks for your interst in Sun Java Studio Creator. Please feel free to post any question related to creator on this forum .
    Take a look the creator website at
    http://developers.sun.com/prodtech/javatools/jscreator/
    CreatorTeam

  • Error message: "Java Script turned off, Enable Java Script" How to do this? I have gone into "Tools--then Options--Then checked Java Script--Then the "OK/Save" Button but this has not helped. What is the right course of action?

    Java Script is disabled on my HP laptop. I have done the obvious things. It still will not enable Java Script. What do I try next?

    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]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

Maybe you are looking for

  • All Java Processes off by 1 hour?

    Hi folks, I noticed that all my java apps/development etc..are off by 1 hour. I'm guessing this is related to DST.. java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) 64-Bit Server VM (build 14

  • Blackberry Link will not let me log in

    Hello, I am attempting after  reinstalling BB Link to simply sign in to my account from my MAC operating on Maverick10.9.4. The log in process beings and ends at level 2. The error message  states "unable to sign in to your BlackBerry ID. Confirm you

  • Lightroom does not display a photo after import.

    There are 3 photo currently in a folder.  I saved two more into that folder with photoshop CC both in tiff and psd format.  I imported as normal but the photos do not show up in the library window. If I try to reimport the photos are greyed out as th

  • Reading error message of an order

    hi ,      i want to read the error messages of a order . one probable solution is reading application log but i don't know how to read the application log of a order.

  • After update to 6.0 I lost all my apps

    Where r my apps? How do I get them back?