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.

Tags: Acrobat

Similar Questions

  • need help to activate Adobe Acrobat XI PRO for WINDOWS?

    need help to activate Adobe Acrobat XI PRO for WINDOWS?

    Hi jurleana15722686,

    Work with a subscription or perpetual version (where you bought the software outright)? Are you faced with a particular problem or receive an error message when you try to activate?

    To start, please consult this document: https://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html.

    If you're still having problems, please let us know what is exactly the problem, including the error messages that you receive. It would also be useful to know what version of Windows you are using.

    Best,

    Sara

    [moved to download, installation, commissioning of disucssion forum]

  • Need help with coding for HTML5 with emergency Flash video

    Hello, need help with my coding in Dreamweaver CS5.5 for HTML5 with emergency Flash video. Not sure if the coding is correct. Do I need any other JavaScript etc.?

    code.jpg

    Another thing is that you don't have to include SWF as aid manual if you provide all 3 ogv, webm & mp4 video formats as one of these formats will certainly be played in any browser that is fully compatible HTML5.

    Still one thing you could do if you don't mind hosting your video on Youtube is to get an embed code for Youtube - in this way, you don't have to convert all the files. YouTube will do it for you and it will play on devices of HTML5 as well as supports Flash player of relief for devices that cannot play HTML5.

  • Need help with JavaScript button to save as an event.

    Hello

    I use Adobe Acrobat X Pro and am totally new to scripting of forms in Adobe (completely new to Adobe Acrobat as well!).  There is a backup on a form button that opens the Save dialog box under using a trigger (the mouse upward) and action (execute a menu item - file > save under... > PDF...) and it works fine, however, I want to now use javascript to change the behavior of the button so that it uses a trigger (the mouse upward) and action (run a JavaScript script) , and I want that JavaScript to combine the text values in two form fields (a location drop down and a date text field) and use this string concateneated + ".pdf" as the file name when he opens the Save as dialog box.  Make sense?

    This is what I added to the button as a JavaScript so far I use a test at this time string ("NewFile.pdf") and add the string that is concatenated to the script after that I know that the script works as it should.

    var NouveauNomFichier = "NewFile.pdf";

    var pathArray = this.path.split("/"); "

    pathArray.pop ();

    pathArray.push (newFileName);

    this.saveAs(pathArray.join("/")); "

    Up to present two questions:

    1. when I click the button nothing happens, no dialog Save as or whatever it is.

    2 when I check the properties of the button depending on the Actions tab shows property to select Action "Performing a menu item", even if I chose previously 'run a JavaScript '.

    Thanks for any help!

    The saveAs method will not work if the code is placed in a key event. It would need to be in a JavaScript file to the folder level, inside a function of confidence, inside a block of app.beginPriv/app.endPriv. Each user must have the JavaScript file to the folder level. The button can then call the code in the file. It will be possible for users of the form?

  • Need help with keyframes for start and stop an effect

    I use a mask and blurred for a few seconds. I understand that I must use keyframes to indicate when to start and stop this effect in the video, so that the same area is not trimmed for video full.

    The problem is, I can't find help by correctly setting the keyframes. When I opened the menu keyframes in the effect, it seems that I must together for both the mask took and the blur effect. I did... to start and stop at specific times, but the rest indeed throughout the video, so of course miss me something by using keyframes. The manual to create effects is not useful. I need assistance with keyframes as what I'm doing is clearly not working. Help!

    If the mask does not move that you don't have to set the keyframe. For the blur, click the stopwatch next to 'bluriness' add keyframes as below, the Reds don't blur and blue those maximum blur this fade effect.

  • Need help with divers for ASUS Intel Socket 775 Motherboard,

    Need help to locate drivers for this motherboard, my external USB hard drives do work not be recognized, no drvers for SM Bus controller, link controller SATA Silicon Image Sil 31 or 32,.

    To help you to download the drivers for your computer, you can check out the link below. You can also contact the Asus Support using the link below.

    http://support.ASUS.com/download/download.aspx?SLanguage=en-us XD

  • Need help with license for Windows store

    Hello! I have problem with Windows store, he says he has a problem with the license.

    It happened because I tried to upgrade my Windows 8.1 to Windows 10 and I've failed at about 20 times. Servers of M$ have been save this issue but they have not registered my fails so now servers $ M think I use illegal license for my laptop. My laptop is Asus F55A and I can not use the store because M$ servers does not allow me too.

    Please Microsoft something about it.i have legal Windows but probably your servers register this as illegal because I repeatedly upgrading to windows 10 who never worked and your servers did not know my fails.

    Please answer.

    Error with Windows store code "this application failed to start because of a problem with its license. Please try again later.

    Any help will be for me!

    Hello

    Thanks for posting your query on the Microsoft Community.

    According to the description, I understand that you are facing problems with Windows.

    I suggest you to refer to the suggestions of B Abid replied on 29 October 2012 and check if that helps.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-windows_store/unable-to-open-Windows-8-store/8a90d67e-9FEE-4B1F-A549-e702d0b207f4

    Hope that the information provided is useful. Let us know if you have questions related to Windows, we will be happy to help you.

  • Need help with as3 for pop-up window

    I'm nearing the end of the semester in my Flash Animation class. I learned things very simple AS3, extracted etc. code. I'll try to find the actionscript code to encode a simple popup window, but have not found a clue.

    Here's what I want to do... I have a white box with a certain guy on the stage. When a person clicks on the white box, I want a popup to open which is larger, which contains the same type but bigger. This box will have an x, so it may be rejected. I don't want to do it in html, only in Flash CS5. I don't want a browser window, I want just a larger version of the smaller area. I know how to build the two boxes, do not know how to write the code. I know there will be a click on the mouse event listener, and then I'm lost.

    Can someone help with the code that I could use? It would be most appreciated.

    It would be something along the lines of... (using the names of instance from your description)...

    Popup.Visible = false;

    whiteBox.addEventListener (MouseEvent.CLICK, showPopup);

    function showPopup(evt:MouseEvent):void {}

    Popup.Visible = true;

    }

    popup.popupX.addEventListener (MouseEvent.CLICK, hidePopup);

    function hidePopup(evt:MouseEvent):void {}

    Popup.Visible = false;

    }

  • Need help with adapters for T60 wireless

    Hello!

    I recently came across a T60 and I need it to be able to 5 GHz Wireless. The wireless current is not.

    I'm not a genius when it comes to wireless cards, where they are and whether or not they are compatible, this is why I come to you! Will you please help me find a wireless adapter which is dual band, so I can connect more than 5 GHz. No price is too high.

    Thank you for your time!

    -Gabriel Ruiz

    Welcome to the forum!

    If you do not use the BIOS modded, search eBay or Google T 42, 0825 , which is Lenovo a/b/g/n card than some T60 delivered with original series.

  • need help with old microsoft sidewinder precision pro to work on windows xp

    I have windows xp family. I try to get my old precision sidewinder pro controller to work. XP does not recognize the controller even when I went to the control panel command, game controllers, sidewinder(auto detect), all I get is, your gameport or gameport drivers are not properly configured. I don't have my original disc supplied with the controller. Can you please direct me in a simple way so that it works because I'm not very good with the Tech stuff. The product I.D. # for my controller is: 85791-579-9297393-00000. The manufacturer is: x 03-57540. It's a Microsoft Precision Pro. It has 4 buttons on the left of the controller, under the buttons he has a small spinning wheel like the disc, according to which another button with an arrow pointing forward, the button can be toggled back for 2 functions, then it has a handle in the middle with 4 buttons on the top and a button below. thank someone for all help.  E-mail address is removed from the privacy *.

    http://www.Microsoft.com/windowsxp/expertzone/newsgroups/reader.mspx?DG=Microsoft.public.WindowsXP.General

    AS it is a question of XP, and the Vista Forums, the link above will help you post in the right place for the right info.

    See you soon. Mick Murphy

  • Need help with tabs for recipes

    I'm sorry if this is basic, but my brain does not work after hours of playing with it. I want to put in place a fairly simple tab for the ingredients of the recipe - not numbered as, I understand - but the quantities of ingredients that vary according to the width... May 1, could be 1 3/4 can be 14... I want this column of numbers flush right, then a space, then the rest of the ingredient should be flush left with a hanging indent (see the last line of the example). So, it looks like this (from cooks illustrated):

    tab.png

    Can someone give me an idea how to implement that (and have usable)? Unformatted text would be:

    2 large eggs 1 large white of egg

    1/2 cup (2 1/2 ounced) of all-purpose bleached, sifted flour.

    etc etc etc.

    This makes me crazy... any help appreciated.

    You need to configure it as a paragraph Style

  • Help with Javascript for the button Delete

    Hi, Im new JavaScript and have my code works partially, but the trouble with a nested if-then-else statement.

    I have a page element, P4_COUNT, and if its value is 0, the button Delete will allow the user to delete the record. If the number is > 0, a message should appear stating that the record cannot be deleted. That's what I have so far and it works, but the first ELSE is misplaced. This code is the URL target for my button remove.

    JavaScript:var response; response = confirm ("are you sure you want to delete this POC?'");
    If {(response)
    If (document.getElementById('P4_COUNT').value == 0) {}
    doSubmit ('DELETE');
    }
    }
    else {-this other fires when the user hits cancel on the first question above not what I want, I want another one here who said only: "removal cancelled '"}
    -This one should only be fired if p4_count is not equal to 0
    var answer2;
    answer2 = confirm ('you cannot remove this POC, that this POC is associated with a RIF.');
    If {(answer2)
    Alert ('cancelled deletion');
    }
    else {}
    Alert ('cancelled deletion');
    }
    }


    The above should follow this logic:

    Are you sure you want to delete this POC?
    Yes - if p4_count = 0 then
    delete the record
    on the other
    second line: cannot delete this record
    OK - prompt removal cancelled
    Cancel - prompt removal cancelled
    end if;
    Cancel - prompt removal cancelled


    Help, please. Thank you, Laura

    Published by: user8936524 on May 10, 2010 14:14

    Hello

    Try if it works. I didn't test it

    javascript:if($v('P4_COUNT')*1==0){
    var answer=confirm('Are you certain you want to delete this POC?');
    if(answer){doSubmit('DELETE');}
    else{alert('Deletion Cancelled');}
    }else{alert('You may not delete this POC, as this POC is associated to an FRR.');}
    

    BR, Jari

  • Need help with query for points and polygons, 2 tables of

    Hi all

    I'm slowly stumbling along trying to figure things out space.

    I have two tables, GEO_POINTS:
    (
    DEP_ID NUMBER (12) NOT NULL,
    LINE NUMBER 4 NOT NULL,.
    MDSYS. POINT_LOC SDO_GEOMETRY
    )

    and POLYGON_AREAS:
    (
    POLY_NAME VARCHAR2 (120 CHAR),
    POLY_DESC VARCHAR2 (120 CHAR),
    MDSYS POLY_POINTS. SDO_GEOMETRY
    )

    Neither table is engraved in stone, if any, I can change some structure.

    I'm trying to understand how to write a query to retrieve all the points in a polygon, perhaps even with an optional buffer provided by the user.

    Conversely, I would probably also need to know what polygons a point would have drawn in, and it's the only request I could make any progress on.

    What I have so far, which is not working properly, is the following:

    Select * from deposits_search where dep_id in)
    SELECT dep_id
    OF geo_points, polygon_areas
    where (sdo_relate)
    poly_points,
    (SELECT point_loc
    OF geo_points
    WHERE dep_id = 10282444),
    ("mask = ANYINTERACT") = "TRUE");

    In the light of the foregoing, I want to select all the lines of a third table (DEPOSITS_SEARCH), for all polygons which is a point. The DEP_ID column is my primary key for most of the data tables in the database, and the number rose in my application query. However, the above returns all rows. It should only return one, because I only have a polygon of test defined so far.

    Any help is greatly appreciated. Thank you

    Bill Ferguson

    in which case you must include a line of buffer for the interaction between the points and polygons (with a stamp),

    better, you use the SDO_WITHIN_DISTANCE operator.

    http://download.Oracle.com/docs/HTML/B14255_01/sdo_operat.htm#i77653

    Not so sure what you mean with "I always have problems while providing a point location and extract the polygons that point would be plotted in" as so-called before unless you want that as a 'transitional instance of a geometry. (Specified using a variable binding or a builder SDO_GEOMETRY.) »

    http://download.Oracle.com/docs/HTML/B14255_01/sdo_operat.htm#i78531

    Read what geometry2 means in there. Read the examples and you will see that you have the geometry second in space operator as a builder. If this is what you need.

    Luke

  • Need help with installing Linux on Satellite Pro A300

    Hello

    I would like to install Linux on my laptop and am wondering which is the best distribution I can use and is it simple to follow guide to use so I'll get to the top and running with a dual boot with Microsoft Windows Vista?

    Please help because it is really important to me!

    Appreciate your help in advance.

    Thank you
    Bill.

    Hello

    To be honest I didn't install Linux on my laptop with Vista and XP.
    Sometimes, I use Linux Live distribution called Koppix, and I m satisfied!

    The devices have been recognized, and most of the drivers were included.

    Maybe it s an option for you too

    But Ubuntu might also be interesting for you.

    Check this box:
    http://www.Ubuntu.com/

  • Need help with drivers for Satellite P205-S6267

    I think I have all the drivers for my laptop, but I can't control the brightness of the screen or access capabilities of standby power. I downloaded tons of drivers power saver, and none of them work. Someone please help. I am running XP and the only driver I found is for Vista. I've been at this for two days... Please write to me at:

    [email protected]

    Hello

    Just FYI: whenever you need a driver download from http://www.csd.toshiba.com/cgi-bin/tais/su/su_sc_home.jsp?

    As you can see your model of laptop is not yet supported for WXP and I guess you have to wait because you need precisely designed these tools and utilities for your laptop model. In the meantime, I think you can live without brightness control option. In my opinion, it is not so important. Also try to use the Windows power saver options. I'm sure you can use them up to what Toshiba offer WXP tools and utilities.

Maybe you are looking for