JavaScript help acrobat

Hello

I'm new here

I hope you can help me with my wish

So I have 2 fields, one is second TEXT1 is Text2. I want to do the following:

If the value of Text1 "75000" then I want to change value automatically TEXT2 '150 '.

Thank you

Best regards

Use what the calculation script personalized to TEXT2:

var v = this.getField("TEXT1").valueAsString;

If (v == "75000") event.value = '150 ';

else event.value = "";

Tags: Acrobat

Similar Questions

  • How to install automation JavaScripts in Acrobat Pro ms?

    In earlier versions of Acrobat, there are two folders that you could install JavaScripts in being able to access it in Acrobat. These JavaScripts have been for specific features such as Office Automation and processing app. Installation of the scripts in this way doesn't seem to work in Acrobat Pro ms and I can't find anywhere, any accused Adobe on change.

    Can someone tell me:

    • How am I supposed to install Javascripts in Acrobat Pro ms?
    • How can I share or in bulk, installing them on other machines?
    • How am I supposed to install Javascripts in Acrobat Pro ms?
    • How can I share or in bulk, installing them on other machines

    1 acrobat place application-level folder in the folder of the program under Adobe, Acrobat, code of the version of the system. and in %AppData% Adobe javascript file. Acrobat, privileged, JavaScripts, code version. The folder of the user depends on the version of Windows, the user is running.

    Actions of the Assistant or the batch of files are controlled by Acrobat/Reader as it is the location of the folder of stamps.

    There was an announcement by Adobe Acrobat has been updated to 10.0.1.

    Version Acrobat D code is DC.

    2. you must ask your users how to install scripts on their system for the operating system and the version they use.

  • How to run acrobat javascript thorugh acrobat plugin?

    I need a task using JavaScript... but I'm not able to run javascript of my plugin... I tried using the AFExecuteThisScript method in the API, but it calls '_gAcroFormHFT '... How can I import HFT in my plugin?

    Is there another method to run a JavaScript plugin acrobat?

    You must declare a variable (global) something like:

    HFT gAcroFormHFT;

    Then initialize it in your plugin PluginImportReplaceAndRegister method, something like:

    ACCB1 ASBool ACCB2 PluginImportReplaceAndRegister (void)
    {
    gAcroFormHFT = Init_AcroFormHFT;

    Returns true;
    }

  • Need help with Javascript for Acrobat 9 Pro

    Hello

    I have created a PDF form in Adobe Acrobat 9 of Profession.  Not having not much experience with Javascript, I found this forum very helpful and have many examples of script used to other issues, I had.  I was hoping that someone could help me with the following script, I tried many variations, cannot operate.

    var ratio = this.getField("ratio").value
    concentration of var = this.getField("concentration").value
    var result = this.getField("result").value
    If (ratio.value > = 50.00)
    {result.value = 'PASS' ;}
    If (ratio.value".value > = 40.00)
    {result.value = 'PASS' ;}
    If ((concentration.value ==61) & & (ratio.value > = 49,25))
    {result.value = 'PASS' ;}
    If ((concentration.value ==61) & & (ratio.value > = 39.25))
    {result.value = 'PASS' ;}
    If ((concentration.value ==62) & & (ratio.value > = 48.50))
    {result.value = 'PASS' ;}
    If ((concentration.value ==62) & & (ratio.value > = 38.50))
    {result.value = 'PASS' ;}
    on the other
    {result.value = "FAIL" ;}

    It's just a piece of code, concentration values run from 61 to 99 and the value of the ratio varies for each value of the concentration, there is a high ratio and a low ratio.  The result of this field to complete the field of results with a SUCCESS or a FAILURE.  This isn't working... any help is greatly appreciated!

    If this script is attached to the Calculate of the "result" field event, if I understand correctly the logicm code should be something like:

    // Get a reference to the ratio field
    var ratio = this.getField("ratio");
    
    // Get a reference to the concentration field
    var concentration = this.getField("concentration"); 
    
    // Default
    var res = "FAIL";
    
    if (ratio.value >= 40.00) {
        res = 'PASS';
    }
    
    if ((concentration.value == 61) && (ratio.value >= 39.25)) {
        res = 'PASS';
    }
    
    if ((concentration.value == 62) && (ratio.value >= 38.50)) {
        res ='PASS';
    }
    
    // Set this field's value
    event.value = res;
    

    If the code is placed elsewhere, you must indicate the location.

  • Keep the layers shown by javascript in Acrobat

    Hey guys,.

    I'm hoping to find an answer to my problem here, because I don't really know what else to try right now...

    I did a dynamic form for a company with Adobe Acrobat Pro. If I chose something a menu drop-down, some new forms and another layer of the PDF file becomes visible. I managed to do all this using javascript and form actions.

    The problem is that I am not able to keep the layers visible when I save. Is it possible that it remains exactly as it was when I am saving? It would be really important because the company uses this form to customer and they need to see what was visible and verified by customers of course.

    Thanks for the help

    Philipp

    There are two ways to do this.

    The first is to change the property initState layer that determines if it showed or not when the file is opened.

    It is the best way to do it, but the problem is that this property is read-only in the drive, unless your file is only used in Acrobat is not really feasible.

    The second is to use a script to show/hide layers based on logic when the file is opened, using a script at the level of the doc.

    The logic will be probably the same thing as what you already use for your drop-down lists and other areas, you just need to adjust it so that it is executed when the file is opened, not only when the values of these fields is changed.

  • Calculation javascript in Acrobat Pro XI

    Good,

    I need help in writing a javascript script to calculate sales tax in an acrobat form.

    I want the value of the "Taxe_Ventes" classified as "0.00" unless the value of the field "Customer_State" is "WILL", so I want to be "Subtotal" value of "Sales_Tax" * 0,053.

    Can someone help me with this? I don't know javascript, and google isn't helping a young girl.

    Thanks in advance!

    Use what the calculation script personalized of Taxe_Ventes:

    var state = this.getField("Customer_State").value;
    var subtotal = Number(this.getField("Subtotal").value);
    if (state=="VA") event.value = subtotal * 0.053;
    else event.value = 0;
    
  • Button action JavaScript blocks Acrobat

    Hello

    I work for a company with multiple versions of Acrobat Standard and Pro, from 9 to 11.  We sell software that organizes the construction documents.  This software is written in code .aspx and pulls from a Microsoft Access database that lives on a server, (PDF, for the most part) files in a windows folder structure, related to access.  We 'hotlink' many of these documents by using the buttons in pdf files.  We create a button, add a mouse up-> run a JavaScript action pointing to the URL for the destination web we take this link for access.  For example, if we want to access a page created from our .aspx code, from within a pdf file, in the menu edit JavaScripts we add "app.launchURL("..) ". /.. /.. /.. documents_details.asp? ("BLDG = SOWP & Div = 26 & DivName = ELECTRIC / Sec = 265100 & SecName inner = % 20Lighting & Page = accessories & Tag = C1 ', true); ».  The series of /... /... are the number of deep layers in the structure of the pdf files, the link is on and the code page file lives in.  So in this case, the pdf file is 4 subfolders in the code page file lives in.

    So, it's the substance of what we do.  My problem is that in Adobe Acrobat Pro and Pro X XI, whenever I try to create a button or paste into a button of a previous document, adobe hangs and eventually crashes.  I can't either create, change or move buttons.  We have created these fines since acrobat 7 without problem until versions more recent.  With Acrobat 9 Pro, creation and Paste buttons works most of the time.  After you move a button of a part of the PDF to another, it hangs for 10 seconds before free up and allow me to work again.  Sometimes it hangs indefinitely, and I have to restart Acrobat.

    Can anyone help with these questions?  We use mainly business image Windows 7 Professional, computer laptop Dell latitude E64xx series processors i5 - i7, 4 GB of ram.  I tried this on own complete installs of Windows 7 Professional as well with the difference, if not our brand image.

    This is probably due to the way that Acrobat will automatically reorganize the tab order that fields are added and changed. If you have access to 11 Acrobat, you can disable this option via a preference of forms: Edit > preferences > forms > tab order automatically adjust when you change the fields

  • If/then JavaScript help needed

    Hello

    I'm trying to write a script for a PDF in Adobe Acrobat form, but I don't have much experience with JavaScript and I need help!

    Basically, I have five fields as follows:

    A1 = a checkbox

    B1 = a field with a numeric value in it

    C1 = one field with a numeric value in it

    D1 = a field with a numeric value in it

    E1 = a field where calculation of the sum.

    I want to write a script that will enter into the sum of the values of B1 + C1 + D1 E1 if a1 is checked yes.

    If it is not checked yes, then he enters the sum of the values of B1 + C1 + D1 value by 2 (and rounded down) divided in E1.

    Can anyone help?

    Thank you!

    This should do it like the custom for E1 calculation script:

    // Custom calculate script
    (function () {
    
        // Get the field values, number fields as numbers
        var a1 = getField("A1").value;
        var b1 = +getField("B1").value;
        var c1 = +getField("C1").value;
        var d1 = +getField("D1").value;
    
        // Set this field (E1) value based on the state of the check box
        if (a1 === "Off") {
            event.value = b1 + c1 + d1;
        } else {
            event.value = b1 + c1 + Math.floor(d1 / 2);
        }
    
    })();
    
  • JavaScript help: get the current line inside tabular

    Hello world

    I hit a roadblock for a simple JS code: to get a current line for my tabular form. My environment is: Apex 4.2.6 on Oracle 11.2 with 3 Bootstrap for styling.

    The query in tabular form is as simple as this:

    Select

    "REF #"

    «INV #»

    "MANUFACTURER."

    "DISCOUNT."

    'PRICE ',.

    "UPC",

    "DESCRIPTION."

    quantity,

    "LINE NO.",.

    "" step by step

    of Order_items

    Now the emphasis here is "stepper", it is defined as "text save any State", in the expression of the HTML, I added this:

    < div class = "btn-group" >

    < button type = "button" class = "btn, btn - lg" onclick = "plusClicked ()" > + < / button >

    < button type = "button" class = "btn, btn - lg" onclick = "minusClicked (); ">-< / button >

    < / div > <!-/-> button

    The screen is as follows:

    Screen Shot 2015-02-06 at 9.44.49 AM.png

    In the header of the Page Javascript section:

    function plusClicked() {}

    var line, qty;

    Row = $(this). Closest ("TR");

    I tried row = $(this) .parent () .closest ("tr");

    same undefined result

    Qty = Row.Find ('input [Name = F09]'). Val();  F09 is the entry for the qty column name

    Alert ('most clicked qty =' + Qty);

    }

    The result is always: 'most clicked qty = undefined ".  Inspect the code says this:

    Screen Shot 2015-02-06 at 9.57.49 AM.png

    Any help and suggestions are greatly appreciated.

    The few I tested it seems solid to me.  I think you have to pass 'this' to plusClicked and minusClicked.

    onclick = "plusClicked (this)" "

    Then, the function can do:

    function plusClicked (btn) {}

    var line, qty;

    Row = $(BTN). Closest ("TR");

    Qty = Row.Find ('input [Name = F09]'). Val();  F09 is the entry for the qty column name

    Alert ('most clicked qty =' + Qty);

    }

    The other approach, I like it for it's with a DA.  I would like to add a class to the buttons instead of the onclick.

    DA would be during the click on jQuery selector .btnPlus

    and the JS to run would be:

    var $row = $(this.triggeringElement) .closest ("tr");

    var qty = $row.find('input[name=f09]').val ();

    Alert ('most clicked qty =' + Qty);

    I hope this helps.

    Thank you

    -Jorge

  • JavaScript help

    Hello

    I need help with javascript.   I have a dynamic action similar to below, but instead of testing a string of 1 byte, I want to test a substring.   So, if C1 = "111111', and I want to test check the first character (IE."  '1'), how I would clarify that?

    Thank you.

    Paul

    $("td[headers='C1']").each(function(){
       switch($(this).text())
       {
            case "1":
               $(this).parent().children("td[headers='FC_QTY_MONTH01']").css({"background-color":"#FFFF99"});
               break;
            default:
               break;
        }
        $(this).css({"visibility":"hidden"});
        $("th[id='C1']").css({"visibility":"hidden"});
    });
    

    Hello

    Try using the substr JavaScript method.

    http://www.w3schools.com/jsref/jsref_substr.asp

    Try if it works

    $("td[headers='C1']").each(function(){
       switch($(this).text().substr(1,1))
       {
            case "1":
               $(this).parent().children("td[headers='FC_QTY_MONTH01']").css({"background-color":"#FFFF99"});
               break;
            default:
               break;
        }
        $(this).css({"visibility":"hidden"});
        $("th[id='C1']").css({"visibility":"hidden"});
    });
    

    Kind regards

    Jari

  • Need help: Acrobat Pro XI - reduced size PDF vs PDF optimized

    I hope that some of you people can help me, I can't contact Adobe customer service.  I've recently updated to Acrobat Pro XI.  In my old version of Acrobat Pro, I used to be able to take a large PDF file (let's say 10 MB) and shrink considerably down with relative ease (less than 1 MB).  The file could then be easily sent, share, read, and especially don't take tons of hard drive space.  With this new version of Acrobat Pro XI, this same file of 10 MB barely reduced up to 7 or 8 MB.  I played with different settings in either the file-> save as others-> PDF of reduced size and File-> Save As-> optimized other PDF.  No matter what I try, I can't reach anywhere near the same compression results than what I used to be able to achieve with my older version of Pro.  I can get the file size reduced, but the reduced quality of the file is trash.

    Has anyone else has this problem as well?  Anyone of you have any suggestions on what to do to fix?  I have mainly to scan a document in PDF with my HP OfficeJet Pro and then reduce the size of the PDF file after the scan.  I could scan the document with DPI lower initially (currently scan 300 dpi in grayscale), but then I have not the quality of the scanned image I need to reduce the file down so that it can later be reprinted at a good enough quality.

    Leonie... I could have thought of it!  Don't have time to play with it now, but try this out.  Open large PDF you want to shrink in size.  Go to view-> tools-> processing of documents.  There should be a toolbar that opens on the right side of the screen next to the document.  One of the selections will be in PDF format to optimize.  When I did, I got a 12 MB document reduce less than 1 MB!  You can play with the slider to choose a smaller / more low quality vs a bigger / better quality.  I don't know why they hid this feature here, but I think that's what we are looking for.  I highlighted the command and dragged to my main toolbar to make it easier to access next time.

    Hope this helps!  I would like to know how it works for you.

  • PDF forms JavaScript help

    Hello

    I learned the hard way JavaScript forms may not work on tablets (through various OS). I have two scripts for calculating custom running in my form and I was wondering if there is another way to write, or a work around, where he will work on tablets (I'm no JavaScript expert!)?

    I have a calculation that counts the number of boxes in a list (check the 20-31) that are enabled:

    var total = 0;

    for (var i = 20; i < = 31; i ++) {}

    If (this.getField("Check_Box"+i).value! = 'Off') total ++;

    }

    Total = Event.Value;

    From there, I have another calculation that returns a value in another field, based on the number of boxes checked:

    var a = this.getField("Check_Box_Count").valueAsString;

    Event.Value = "";

    If (a == '1') event.value = "0.00";

    If (a == '2') event.value = "300.00;

    If (a == '3') event.value = "300.00;

    If (a == "4") event.value = "300.00;

    If (a == '5') event.value = "300.00;

    If (a == "6") event.value = "300.00;

    If (a == '7') event.value = "300.00;

    If (a == '8') event.value = "300.00;

    If (a == '9') event.value = "300.00;

    If (a == '10') event.value = "300.00;

    If (a == "11") event.value = "300.00;

    If (a == '12') event.value = "300.00;

    I don't know which one, or both, is the question. Is there a work-around, I could use?

    Thank you very much in advance for any help!

    ValueAsString property is not supported in Adobe Reader for iOS/Android. It is not clear to me if you could get away with using the property value instead, but of what you show this should work if you change the code to:

    If (a == 1) event.value = "0.00";

    etc.

  • Custom JavaScript help

    I have 5 combo with choice boxes of Y, N and NA. When enabled will score 3, when selected the partition is 0, when is selected the score indicates no score. I have a text box which then displays the final score in 5 drop-down list boxes, on a possible 15. I have a last text field that will show a pass or careless. A pass would be 15 nothing less that 15 is a failure. I have JavaScript custom indicating the following:

    Invoke the var = new Array ("6 Combo Box 1", "6 Combo Box 2", "6 Combo Box 3", "6 Combo Box 4", "6-5 combo box");

    var aDefault = new Array();

    for (var i = 0; i < aFields.length; i ++) {}

    If (this.getField(aFields[i]).value == this.getField(aFields[i]).defaultValue) {//compares value in the default value field is empty

    aDefault.push (aFields [i]);  This will create an array of fields not filled

    }

    }

    var = v + this.getField ('Model Call Score') .value;

    If (v > 14) event.value = "Pass";

    else event.value = "Fail";

    Check if aDefault contains at least one field

    If (aDefault.length > 0) {}

    Event.Target.Display = display.hidden;

    hide my value if a field is always empty

    }

    else {}

    Event.Target.Display = display.visible;

    }

    I understand that the last part of the code says to make the hidden value. I want a success or a failure is displayed only when all combo boxes are selected. I don't have knowledge of JavaScript. Could someone please help me fix my current or future code with another suggestion. A link to my form is attached. My question above refers to the lower part.

    Change this line:

    If (this.getField(aFields[i]).value == this.getField(aFields[i]).defaultValue) {//compares value in the default value field is empty

    To do this:

    If (this.getField(aFields[i]).value = this.getField(aFields[i]).defaultValue) {//compares value in the default value field is empty

  • JavaScript help please

    I want to be able to have a drop-down list box to automatically populate a field with a sentence or a number. I don't know javascript and need help.

    For example, in the "drop-down list box 1" - cats, dogs, Hamsters, fish

    If I chose to cats, the field 'Text1' must '25 000 '.

    If I chose the dog, the field 'Text1' must '10 000 '.

    I know that it is a simple custom calculation but still need help

    Thank you

    The easiest way is to set the value of the export of each element of list box the corresponding numerical value. The calculation simply sets the value of the field to the value of the drop-down list box. In JavaScript, this would be:

    Event.Value = getField("combo_box_1").value;

    If you do not want to set export values FRO the drop-down list box, the custom calculation script might look like:

    (function () {}

    Object to associate items drop-down list with numbers

    oval var = {}

    "Cats": "25 000",

    'Dogs': '10 000 ',.

    'The birds': '15 000 '.

    }

    Set this field to the associated to point number value, or empty if missing

    Event.Value = oval [getField("combo_box_1").value] | "";

    })();

  • JavaScript: Help with IF statement

    I'm not familiar with Java and I fight with this IF statement and I can't make it work.  I'm sure it's something pretty basic.  Can anyone help?  I tried everything, seeminly.  In this example below I'm checking if the data that the user has entered in the field of the AAA FAVOR and if it is then put in place a message and if not then set up another message.  My top node in my hierarchy is data, and then I have a MainSubform and a Contact02Subform.  I have this code attached to a button and notthing happens when I click the button.  If I delete the statement and have just the box of message by itself, then it will display the message box.  So I know that's my statement and I'm sure it's simple.  Help please?

    If

    (xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR").rawValue == 'AAA')

    {

    xfa.host.messageBox ("my IF");

    else ;

    xfa.host.messageBox ("my ELSE");

    endif;

    Try this.

    If (rawValue. xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR") is 'AAA')

    {

    xfa.host.messageBox ("my IF");

    }

    on the other

    {

    xfa.host.messageBox ("my ELSE");

    }

    endif is used in FormCalc are generally not in JavaScript.

    Thank you

    Sidonie.

Maybe you are looking for

  • 15 - ba006nl and 15-ay008nl: ram taken Max supported for upgrade

    I would like to know the maximum ram supported for two laptop. On the HP page, it is not specified. They are the two 8 GB of ram (ddr3l for 15-ba006nl) and ddr4 for 15-ay008nl but the max ram supported for a future upgrade is not present. Maybe it is

  • 2000-2d49TU HP laptop: laptop HP 2000-2d49TU

    Hello team HP, My hp laptop # is product Laptop HP 2000-2d49TU HP DVDRAM GT80N ATA Device does not work and I am not out of the hp site, please help me. Thank you Pradeep

  • How to program picture two layers?

    Hello I want a picture of a sign that has a map in the background information and a GPS position as a figure are updated on the program card. Map file format can be e.g. bmp. NOR example alphablend with x % of transparency is something that I could f

  • Collect data from specific frequency of the power spectrum

    Hello I want to know how to collect data from specific frequency of power spectrum file. I'm trying to separate data from specific frequency of the original file.

  • BIOS Update and graphic swichable

    Please help... Hi... my laptop HP envy sleekbook 6-1150ex? Help, please... you have the problem for my Graphic swichtable? PES 2013 seeding GPU intel only... and the bad comments... Advise me please?