Need help with Java Script to perform a calculation in the form of Adobe Acrobat Pro 9

I have a form (test) I created in Adobe Acrobat 9 Pro.

I need help to create a custom JavaScript, so I can get the desired response.

1) there are several questions in each group requiring a numeric response between 0-4

2) there is a total set up field to calculate the sum of the responses of all of the above questions

(3) the final "score" takes the answer in step 2 above and divide by the total possible response

Any help to what Java Script I need to fill it would be greatly appreciated!

I have attached a spreadsheet "" which shows more in detail as are the result of what I used in Excel to get the desired end formulas.

Thanks in advance.

Have you tried the "field is the average of:"?

Tags: Acrobat

Similar Questions

  • I need help with Java Script if/then statement

    I have absolutily no experience writing Java Script any help at all would be appreciated.

    I am working on a form in which I need a box for the person filling out the form click if they are a company be exempt from taxes. Well, obviously when they check the box I need field sales tax to change $ 0.00 total cost will only be calculated on the price of the items.

    Currently I use steps in the field of calculation for my Salestax.

    var k = this.getField ("SubTotal");

    K.value = Event.Value * 0.0825;

    Yet once, all possible assistance would be greatly appreciated.

    Tiffany

    Let's say the name of the box is "IsTaxExempt". Then you can use this code as the field of Salestax calcluation:

    If (this.getField("IsTaxExempt").value == "Off") {}

    var k = this.getField ("SubTotal");

    K.value = Event.Value * 0.0825;

    } else event.value = 0;

  • Need help with java script date

    Hi all

    Using Mac OS 10.6.8 and Adobe Acrobat 9.

    I am working on a form that has course date when you open the form.

    I have a field to enter an earlier date.

    If the effective date is = to or more than 3 years old (1095 days), then it will show a hidden field "sorry your registration has expired.

    If date enered is less than 3 years, then the field remains hidden.

    I have a field to display the result in days, I'm going to hide once the script works.

    Here is the shape right now.

    www.nixmailmac.com/register.PDF

    Any help would be appreciated.

    Ron has

    The code that I provided above is a compacted to if-then-else way. If you really want to, you can use this instead:

    If (event.value< 1095)="">

    getField("Enter_Field_Name_Here").display = display.hidden;

    } else {}

    getField("Enter_Field_Name_Here").display = display.visible;

    }

  • Need help with java script

    I have a small script that changes the color of a button image that I use for a popup topic. It does this, of course, by exchanging the two images.

    The script works very well in HR overview and also when the htm page is opened directly in a browser (IE or Chrome).

    However, when I open the topic in the compiled help, the second image does not display.

    Those who work in HR overview. Who isn't in the compiled help.

    Here is the code:

    < a href = "javascript:BSSCPopup('..)". /MenuLocations/3DFace_menu_location.htm'); »

    "ID ="a1"style =" "position: relative;" > < img onmouseover = "this.src = '... /ClickButton - O.png'.

    onmouseout = "" This.src = '... ClickButton.png' ""

    "SRC ="... / clickbutton.png ".

    ALT = "Click for locations of menu and toolbar and related topics."

    border = "0" / >

    Any ideas?

    ~ Margaret Becker

    HI Margaret

    You should probably add the second image to luggage to its intended location. Because JavaScript must manage by exchanging images, RoboHelp is probably not aware of the second image.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7, 8 or 9 in the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • Need help with a script (o - o8) *, see the Virgin if there is no

    Hi all what I need help with a script I can't find an example.

    I'm trying to subtract 2 numbers and then multiply this product. (o o8) * one but I just want to do the calculations if all fields have the numbers IE field o, o8 of field and field one.

    Thank you in advance. I was stuck on this days searching the Internet.

    Assuming you want to affect the outcome of this calculation in another text field, use this code as a custom field calculation script:

    var o = this.getField("o").valueAsString;
    var o8 = this.getField("o8").valueAsString;
    var a = this.getField("a").valueAsString;
    if (o!="" && o8!="" && a!="") event.value = (Number(o)-Number(o8))*Number(a);
    else event.value = "";
    
  • NEED HELP WITH SERVICE PACK 3. After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. ,

    NEED HELP WITH SERVICE PACK 3.  After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. , but it of although he gets, he keeps countdown to restart and reboots and restarts, over and over again, never reboots, same screen. my computer won't let me out this screen even after I turned off the computer and turn it back on, I get the same screen. the only way I can get out of this is to erase my computer everything and bring it back to factory, right out of the box, this big headaches. Thanks for anyone who can help me. PS. Keep the answers in simple terms please.

    Hi BSRC$, in stock

    1. You have security software installed on the computer?
    2. You receive an error message when you restart the computer?

    Reinstalling Windows XP to the factory setting would not be the first option.

    It is possible that some third-party programs or the services installed on the computer interfere with the installation of service pack 3.

    I suggest that you try to uninstall service pack 3 from the computer by using the recovery console and subsequently ask the article below for what to do before installing the service pack 3on the computer.

    How to remove Windows XP Service Pack 3 from your computer

    http://support.Microsoft.com/kb/950249

    Steps to take before you install Windows XP Service Pack 3

    http://support.Microsoft.com/kb/950717

  • I bought the DC of Adobe Acrobat pro and completed the info online, but when I use the cd with the product code key it will not take the code?  What do I do then?

    I bought the DC of Adobe Acrobat pro and completed the info online, but when I use the cd with the product code key it will not take the code?  What do I do then?

    Thanks Anubha Goel, final I got it to work... The serial number in the physical box that you buy in the store wasn't the number for the software.  It was the serial number in the cloud, very difficult to know when you see a serial number in the box with the Cd online.  But thanks for the reply to my post. I'll be in offline mode after clicking on answer...  Thank YOU Ana Maria

  • need help with my screen has been using mouse and the screen is smaller and smaller

    need help with my screen has been using the mouse and the screen is smaller and smaller, so can't see

    Try to hold the 'ctrl' key and turn the wheel of scrolling the mouse forward to zoom, turning the scroll wheel to the rear is to zoom out.

  • If/then box script help in the form of Adobe Acrobat...

    If having a purchase order that has two different fields of price (regular price per point & subscription price per article for each line item, then a quantity) and then a total field. Finally, there is a checkbox on the form indicating if they sign up for a monthly subscription.

    What I try to do is create a script that totals each line by the current price multiplied by the quantity or the price of the subscription by amount if the subscription checkbox is checked ("Yes"). So far, I've tried several scripts, I found in the forum but no luck at all.

    The box is near the billing fields down, so all the line items first appear in the upper part of the form. Thus, an individual if each line and calculations would amount in total to each line (reg * qty price) when you get off of the form... When you check the subscription all line totals would have changed to reflect the subscription rates on each line (which may be different). Just need help with a single line and I can duplicate for each line...

    Here's what I does NOT again...:

     (function () {
    
    
    if (this.getField("sub").value==="Yes") {
         var b1 = this.getField("Price1b");
         var c1 = this.getField("Qty1");
         var d1 = this.getField("Price1");
         event.value = b1.value * c1.value;
    } else event.value = d1.value * c1.value;
        }
    
    
    )();
    
    

    Try this:

    (function () {}

    var b1 = getField("Price1b").value;

    var c1 = getField("Qty1").value;

    var d1 = getField("Price1").value;

    If (getField("sub").value = 'Yes') {}

    Event.Value = b1 * c1;

    } else {}

    Event.Value = d1 * c1;

    }

    })();

  • I just bought the version upgrade Adobe Acrobat Pro DC, mistaken, that I do not have an Adobe program with a serial number.

    I just bought the upgraded version of Adobe Acrobat Pro DC, error, that I do not have a program Adobe with a serial number. I'm trying to contact the company to cancel my payment and ask them to use the access to download the full version in Australia.  Y at - it (other than the noreply) email address.

    Please see I sent a private message.

  • Need help with custom script to rename the layers

    Hello world.

    I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').

    I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.

    Any help is greatly appreciated.

    * Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).

    This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.

    #target illustrator

    function removeCopy() {}
    If (app.documents.length == 0) return;
    var app.activeDocument = docRef;
    recurseLayers (docRef.layers);
    }
    removeCopy();
    function recurseLayers (objArray) {}
    for (var i = 0; i < objArray.length; i ++) {}
    ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name');
    If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]);
    }
    }

    I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.

    var doc = app.activeDocument;
    var items = doc.pageItems;
    for (var g = 0; g)
        elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook ");
    };
    App.Redraw ();
  • Need help with a script customized for processing in Photoshop CS4 of images in batches. Really grateful for the help thereby.

    Hi people.

    So I have a boatload of pictures that I have to deal with as I'm moving off Ebay and open my own online store and the images that I have on Ebay, although excellent quality are not square, and unfortunately, the model that I use in Wordpress requires square photos.

    Basically, what I need is a script that I can use in batch mode, which will focus on the size of the image and change the canvas size to be square corresponding to the current long image side. Resize the image to 1600 square pixels and finally save for web in JPEG quality 60.

    Normally I would muddle my way through this trying to teach myself but I already do so much with this new project that I can't afford to pay developers for help that I would really appreciate if someone could help me with this script. I use Photoshop CS4 if it made a difference.

    Thanks much for any help you can offer.

    See you soon,.

    J

    A simple gesture can do that. What you need to do is that the action of lot.   With the help of Photoshop Image Processor script.  The Action is a two-step

    N ° 1). File menu > automate > fit Image.  In the dialog box Image Fit you assign Width and Height 1600 pixels.

    Step 2.) Menu Image > canvas size.  In the canvas size dialog box, you assign Width and Height 1600 Pixels.

    Record the action in some action with a name like 1600PxSquare

    Then use the file menu to Photoshop > Scripts > image processor. In the dialog to the Image Processor script. Select your image source folder. Set where you want your jpeg images. Set it to save jpeg files quality 6.  Set it to include your 1600PxSquare action.

    Step adjustment image resize your image to fit in a 1600 x 1600 pixels are while keeping image proportions of images. Portrait image will be high 1600px and landscape image will be 1600px wide.  The step size canvas will add the canvas to make the place of the image.  Portraits will have a border on the left and right images of landscape will be confined to the op and downs.

  • Help with Java Script

    Here's my problem:

    I have a field that populate a 18 digit number.

    I need a java script that will fill only the last 4 digits of the 18-digit number in a separte field.

    Then F1 = 18 pre-filled numbers

    F2 = last 4 F1

    Can anyone help?

    Thanks in advance for any help!

    Use what the calculation script customized for F2:

    var F1 = this.getField("F1").valueAsString;

    Event.Value = f1.substring(f1.length-4);

  • Need help with transformation Script

    Well I'm back for the 2nd time today. I would like to thank all those who helped me with my last issue. But now I have another question that I'm developing. Craig & Dan here me helped with 2 separate sending email responders based on questions in the form.

    You can view the form on this link:
    http://mswebsol.com/gaslockguarantee/creditapplication.cfm

    The problem I have right now, is that I don't get the results that I'm looking. Basically lets say you choose Yes to all 4 questions but on the 5th issue, you click on no. Well as it is now the script sends the answer by e-mail indicating your accepted. But what I'm trying to make, is that if you choose not to one of the questions you will automatically get an e-mail response that says you are not admitted.

    If I choose not to question, I'll get the answer correct email which is "your not accepted" to make it work for the first question. But if you choose Yes to the first question and no to the 2nd or any other question you will get the wrong answer that says "you are accepted."

    Here is the code

    < Cfif StructKeyExists(form,"Q1") >
    < cfif form. Q1 is 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q2") >
    < cfif form. Q2 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q3") >
    < cfif form. Q3 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q4") >
    < cfif form. Q4 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q5") >
    < cfif form. Q5 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >
    < / cfif >

    Any help would be greatly appreciated!

    Thanks to you all

    Derek Bess
    @ Coldfusion newbie

    If I understand you well, all your if/else logic boils down to a simple:
    (1) one of the answers is "No" - send 'rejected' by email
    (2) all the answers are "Yes" - email "accepted."

    I suggest you cfparam all default = 'no' on your action and answers
    the page, so that you don't have to keep control of structkeyexists:


    ...

    After that, all you need is:


    .. .send 'rejected' code email here...

    .. .send 'admitted' code email here...

    HTH

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com/

  • Girls need help with a script to repeat the link to another folder in indesign

    I REALLY hope you smart people can help me.

    We had servers which means that all of our Indesign documents now have a broken link. To manually "re-edit the link to the file" causes Indesign down :-(. And it takes forever I am hoping to find a script that can connect all the links in the doc to a new file structure.

    The name of the link (name of file) and the file structure remains the same; Just point to another server. The structure contains subfolders so the best way would be that the script can see subfolders as well, but otherwise I would gladly use a script that points of 6 subfolders at a time.

    Problem - I KNOW NOT ALL SCRIPTS and I'm a graphic designer so I can't create scripts :-(. I have already had success Googling a script to unlink everything in the document, but I don't know how to run the script. DO NOT to create them.

    ANY help in this forum? I have 6 designers waiting for me to fix this.

    Is there a script where I could just change the path and then he could repeat?

    We have iMac OSX Yosemite 10.10.4

    PLEASE HELP... :-)

    / Dina

    Try this... it is created by Vamitul

    main() {} function

    var doc = app.activeDocument;

    myLinks var = doc.links.everyItem () .getElements ();

    var linkObj = {};

    Create the initial object

    / * {linkObject

    [path] {missingNr,

    arrayOfMissingLinks}

    } */

    for (var i = 0; i)< mylinks.length;="" i++)="">

    If (myLinks [i] .status == LinkStatus.LINK_MISSING) {}

    var myPath = File(myLinks[i].filePath).path.toString ();

    If (linkObj [myPath] == undefined) {}

    linkObj [myPath] = {}

    missingNr: 1.

    missingLinks: [myLinks [i]],.

    newPath: "

    }

    } else {}

    linkObj [myPath] .missingNr ++;

    linkObj [myPath].missingLinks.push (myLinks [i] .getElements () [0]);

    }

    }

    }

    $.writeln (linkObj.toSource ());

    var myDialog = new window ("dialog", "link Chaser:', undefined");

    Panel1 = myDialog.add var ('panel', undefined, "double-click to select the new path '");

    Panel1. Align = ["fill",""];

    myList var = panel1.add ("listBox", undefined, "", {})

    columnWidths: [160, 160, 130],

    numberOfColumns: 3,.

    showHeaders: true,

    columnTitles: ['old road', 'New Path', 'Nr. missing links']

    });

    myList.size = [450, 200];

    myList.align = ["fill",""];

    for {(var missingPath in linkObj)

    with (myList.add ("item", missingPath)) {}

    Subitems [0] .text is linkObj [missingPath] .newPath;.

    Paragraphs [1] .text is linkObj [missingPath] .missingNr;.

    }

    }

    myList.onDoubleClick = function() {}

    var myNewPath = (new folder (app.activeDocument.filePath) .selectDlg ("Select New Folder") |. toString() ' ");

    myList.selection.subItems [0] .text = myNewPath;

    linkObj [myList.selection.text] .newPath = myNewPath;

    }

    myDialog.add ('button', {undefined, "Ok",

    name: 'ok '.

    });

    myDialog.add ("button", undefined, "Cancel", {})

    name: "Cancel".

    });

    If (myDialog.show () == 1) {}

    for (var i in linkObj) {}

    If (linkObj [i] .newPath! = ") {}

    var fixedNr = 0;

    Var links = linkObj [i] .missingLinks

    for (var j = 0; j)< links.length;="" j++)="">

    var queue = newFile (linkObj [i] .newPath + "/" + links [j] .name);

    If {(newFile.exists)

    fixedNr ++;

    Links [j] .relink (NewFile);

    }

    }

    Alert ("in the folder: \n" + linkObj [i] .newPath + '\n' +)

    'Fixed' fixedNr ' links of ' + linkObj [i] .missingNr + '\n ' +.

    "Please check");

    }

    }

    };

    }

    app.doScript ('main()', undefined, undefined, UndoModes.entireScript, "Chaser link");

Maybe you are looking for