Javascript not working in adobe pro

Hello,
  I am trying to use the following if statement:
if(this.getField("Total").value >= 120);{event.value = "Pass"};
Else;{event.value = "Retake"};
Where there is a field called Total that is the sum of many fields. If the total is more than or equal to 120, I want the value in this field to be either the string "Pass" or "Retake"
No matter the value of the Total field, it just say's Pass.
Any ideas on where I am messing up?

Semicolons are a bit funny when mixed with braces {}. Basically a semicolon ends a statement, for instance
x=1; call_routine(1,2);
In an if statement you have
if (something) x=1; else call_routine(1,2);
the semicolons don't belong to the if but to each of the statements. If you tried to write
if (something) x=1 else call_routine(1,2);
though it may look right the problem is that x=1 isn't ended properly. But when you use braces you have a series of statements inside, but you don't end the braces with a semicolon. So
if (something){x=1;call_routine(1,2) }  // wrong, the call_routine(1,2) isn't ended
if (something){x=1;call_routine(1,2); } ;else... // wrong, the ; after } ended the if
The reason you can sometimes get away with extra semicolons is that you can have an empty statement as in
x=1;;y=2; // three statements here, the second is empty

Similar Messages

  • Javascript not working in Adobe Reader

    Hi,
    I have given the following javascript code in the "Will Save" Document Action. But this code does not execute in Adobe Reader, it works fine in Acrobat Standard/Pro. Why this code does not execute in Reader?
    app.alert("Hi");
    if(app.viewerVersion<8){
    app.alert("Exit");
    this.closeDoc(true);
    Cheers,
    Vinay

    Yes the javascript is enabled.
    The alert comes up in Acrobat Pro when I use the 'Save' or 'Save a Copy option'.  When I use the 'Save a Copy' option in Adobe reader, the alert does not come up.
    Cheers,
    Vinay

  • Attach JavaScript not working in Acrobat Reader XI

    Hello,
    I created a fillable PDF in which I used the following JavaScript for an "Attach" button: 
    this.importDataObject("MyFile");
    This JavaScript worked and allowed the end user to attach files to the PDF in previous versions of Acrobat (through version 10 / Pro), but the button's functionality does not work in Adobe Acrobat XI.  The button has no functionality when clicked, and no errors are received indicating what the issue may be.
    Is there a bug that exists making this file not compatible with the Acrobat XI version, or is my coding outdated/inaccurate?
    Please advise and thank you for your help!
    Jessi Fenton

    Did you ever figure this out? I am also having problems with the "No Hand" javascript which turns off the (not very helpful) page-forward hand icon (a hand symbol with a down arrow) which confuses our users when in fullscreen mode. We create interactive PDFs and everything worked fine up to Acrobat X/Reader X. Now in XI it doesn't allow the internal link icon (pointing finger) nor weblink icon (pointing finger with W) to appear. It just remains a plain o’ hand icon no matter what you mouse over even though there are links present.

  • Youtube videos not working on macbook pro

    youtube videos not working on macbook pro?

    I just purchased a 13" Mid 2012 MB Pro, first time on YouTube, the videos would not play, google "Adobe Flash", download and install the player and you should be good.

  • Event.hits property does not work at Adobe 9

    I have just discovered that the property "event.hits" does not work at Adobe Reader 9 properly.
    I have some JavaScript, which uses this property:
    if (event.hits.length > 0)
    var targetPos = event.hits[0].position;
    Now, at Adobe Reader 9 the value of "event.hits[0].position" is not correct.
    At Adobe 8 Standard this JavaScript works very well!
    Can you comment this issue?

    Hello to everyone!
    There is a some PDF file, which works fine on Adobe 8 and does not work properly on Adobe 9.
    You can download this file from the following hyper-link:
    http://www.pdf3d.co.uk/pdf/box97.pdf
    When I open this file on Adobe 8 then gold arrow works fine.
    In this case the gold arrow (pointer) has a true location on the box.
    When I open this file on Adobe 9 then gold arrow has a false location.
    In this case the gold arrow (pointer) has a false location on the box.
    Could somebody can to me a some suggestion?
    Thank you,
    Peter

  • Help! Javascript not working when object moved from one page to another!

    Hello all:
    I am new to Adobe Livecycle Designer (version 8.0). I have created a 3 page interactive pdf form with numerous objects (text fields, radio buttons, drop-down boxes, etc.), that our business wants to begin using soon.
    I am having difficulty with some of my Javascript not working with a few of my objects on page 2 of the form. Specifically, there is a drop-down box for "Country" on page 2 of my form. When the user selects, for example, "United States" from the list, I have Javascript that is supposed to change the "Currency" drop-down box rawValue to "US Dollars" accordingly (upon the change event).
    I think my Javascript syntax is proper, but I am not certain. Here is my simple Javascript associated with the "Country" drop-down box (Note: rawValue 80 = "United States" and rawValue 105 = "US Dollars"):
    form1.Page1.cmbContactInfoCountry::change: - (JavaScript, client) -
    if (this.rawValue == 80) {     
         cmbCurrency.rawValue = 105;
    This seems pretty straight forward and it WORKS when my "Country" drop-down box is moved to page 1 of the form, but it WILL NOT WORK when I move the "Country" drop-down box back to page 2 of the form (which is where it belongs).
    Does anyone have any suggestions or solutions? I have spent probably 6-8 hours racking my brain trying to figure out why it works when on one page, but it does not work when move to a different page. I am guessing that I may have corrupted something OR that I am not fully addressing the proper name of the object?
    Please help!
    Frustrated and helpless near Chicago!
    Taylor T

    Hi Jono:
    Thank you for your quick reply.I was able to obtain the full name of the cmbCurrency object using the method you taught me. That is brilliant! Great short-cut tool.
    Unfortunately, I am still having issues with getting Javasript for the cmbCountry object to work with the cmbCurrency object. I haved pasted my new Javascript below.
    JavaScript for cmbCountry object:
    //UNITED STATES
    if (this.rawValue == 1) {
              xfa.resolveNode("form1.#subform[1].cmbCurrency").rawValue = 1;
    else
    //CANADA
    if (this.rawValue == 2) {
              xfa.resolveNode("form1.#subform[1].cmbCurrency").rawValue = 2;
    I have checked the "Specify Item Values" checkbox of the cmbCurrency drop-down object and Value 1 = "US Dollars" and Value 2 = "Canadian Dollars".
    When I select "Canada" from the cmbCountry drop-down object, the rawValue of the cmbCurrency drop-down object is changed to "US Dollars" (when it is clearly defined as "Canadian Dollars"). When I select "United States" from the cmbCountry drop-down object, the rawValue of the cmbCurrency drop-down object stays blank for uknown reasons. Very strange.
    Since I am not able to further explain in detail on what I am experiencing, I have posted a link to my file below (I just signed up for an account at ShareFile). I would forever be indebted to you if you can help me figure this out!
    https://thomptk.sharefile.com/?cmd=d&id=07ede2fe11db4549

  • After Quick Time update .mov files will not work in Premier pro.

    I have windows 7 and the latest premiere pro. I uninstalled quick time still not working. Other files work fine however I work with a great deal of transparent background videos and now they will not work in Adobe apps. I have looked into solutions but cant find anything for windows. Please point me in the right direction.

    If its not working roll back QT.

  • Thumbnail preview works in adobe reader 9 but does not work in adobe 8.0

    I have small issue. Thumbnail works in adobe reader 9 but but does not work in adobe acrobat 8.0 in win xp

    Anyone going to tell me how to do this uninstalling and installing??????????
    I don't want to mess things up even more! Geez--I'm almost 60 years old,
    need to work and this might be costing me a job. I'm not 20 and text and
    e-mail etc every day. I'm just asking for a little help that as I see it ,
    is due to a "glitch" with Adobe's software. They can easily in their
    technological minds put a warning on anything before someone downloads
    anything such as "If you download this and you  have already downloaded
    that,, then it won't work." How tough would that be??? They, like most other
    major corporations, are in it for the money. What has happened to customer
    service???
    I need a step by step with my hand held and so it won't screw up things even
    MORE. Adobe...get your customer service and your software together...This is
    draining. I may lose a job over it. I need to have my computer running well
    at this point in time as there is no extra time to spend dealing with
    software issue that are a result of Adobe's software incompatibility.
    I was on the phone for TWO hours last night telling people exactly what was
    going on. I even read the error message word for word. No one would help me
    unless I coughed up the money that I don't have...and in addition I will
    lose a job that might get me some money. This is why I am so upset. Why is
    dealing with Adobe always so difficult??? Of course, I am upset. I'm
    actually a lovely person. It is just that this stuff rattles my nerves.
    Especially when there is a jobwith a raiseinvolved that I may lose as a
    result.
    Now I had better get dressed and ready for the job I have now before I am
    late for work and lose that job, too.....

  • Webcam not working with adobe air

    hey frnds,
    i'm trying to capture webcam snaps and storing it on local desktop.
    Below code of capuring snap is working with flex but same code not working in adobe air.
    I'm using Adobe Flash builder beta 2
    is any setting is required to use webcam with adobe air?
    i'm using following code
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/halo" creationComplete="init();">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.core.UIComponent;
                import flash.media.Camera;
                import flash.media.Video;
                private function videoDisplay_creationComplete() : void
                    var camera:Camera = Camera.getCamera();
                    if (camera)
                        videoDisplay.attachCamera(camera);                   
                    else
                        Alert.show("Oops, we can't find your camera.");
                private function capture_click() : void
                    var snap:BitmapData = new BitmapData(320, 240, true);
                    var snapBmp:Bitmap = new Bitmap(snap);
                    snapBmp.width = 320;
                    snapBmp.height = 240;
                    if(snapshotHolder.numChildren > 0)
                        snapshotHolder.removeChildAt(0);
                    snapshotHolder.addChild(snapBmp);               
                    snap.draw(videoDisplay);               
        ]]>
        </fx:Script>
        <mx:HBox>
            <s:Panel title="Video">
                <mx:VideoDisplay id="videoDisplay" creationComplete="videoDisplay_creationComplete();" width="320" height="240" />       
            </s:Panel>
            <s:Panel title="Snapshot">
                <mx:UIComponent id="snapshotHolder" width="320" height="240" />
            </s:Panel>       
        </mx:HBox>
        <mx:HBox>
            <mx:Button label="reload camera" click="videoDisplay_creationComplete();"/>
            <mx:Button label="capture" click="capture_click();"/>  
        </mx:HBox>
    </s:WindowedApplication>
    Camera is connected but cannot see anything inair,
    plz guide me in this.
    thx in advanced,

    I seem to have the same problem. When creating an web application it works fine, but when creating a desktop application it doesn't. I can't figure out what the problem is.
    Does anyone know?

  • PDF Printer not working in Adobe XI

    The PDF Printer option is not working in Adobe XI.    We are using Windows 8.    When I open the printer box and select Adobe PDF, I get an error message stating "The server threw an exception."        The "Save as PDF" and "Convert to PDF" options work but those options are not always available.  

    A server exception would suggest you are using Acrobat in the cloud. I don't have an answer in that case other than trying later. Is the Adobe PDF printer indeed installed on your machine or in the cloud?

  • Says that my serial number is not valid. Adobe Pro XI

    says that my serial number is not valid. Adobe Pro XI

    Hi adobeproxiinstall,
    If you have a subscription for Adobe Acrobat XI Pro you won't require a serial number to serialize it . There will an option to 'Sign In' please click on that & sign in using your Adobe ID to serialize the product.
    In case if you have a perpetual licence for your Adobe Acrobat XI pro you will require a 24 digit serial key starting form '1118'  (1118-XXXX-XXXX-XXXX-XXXX-XXXX ), please crosscheck it.
    Also let me know for where did you download the Adobe Acrobat XI pro.
    The direct link to download Adobe Acrobat XI pro is : Download Acrobat products | Standard, Pro | DC, XI, X
    In case if you experience any issue please let us know, we will be happy to help you.
    Regards,
    Aadesh

  • Obfuscated JavaScript not works in safari 5.0.2

    Hi All,
    I'm very new to safari browser and currently makes my web application in safari. It works fine with few bugs in UN-obfuscated JavaScript.
    Obfuscated JavaScript not works in Safari. Kindly let me know the solution or set up. This is quite urgent and seeks for earlier response.
    Thanks in advance.

    For OS X javascript issues, post to the Unix or Developer forums under OS X Technologies. For windoze issues, I have no suggestions, since I don't do that technology.

  • I updated my mac's OS to Yosemite and now my eye drop tool will NOT work inside premiere pro. Can anyone help me fix this issue?

    The eyedropper tool for selecting colors to key out or to fill text will not work inside premiere pro, this error started when I updated my mac os to yosemite.

    Hi Transportation,
    Does the error occur in OS X 10.9? If not, why not remain at OS X 10.9? Is it necessary to run OS X 10.10?
    The general rule of thumb is that when you are running software that is no longer tested or supported on a new operating system, you have to prepare for anomalies like this. You may want to install a separate bootable hard drive with OS X 10.9 on it so you can continue running that software more reliably.
    Hope that helps,
    Kevin

  • Javascript not working in any browser except Opera! Please help!

    I don't know for what particular reason, javascript has stoppped working in all the browsers I have, (Safari, Firefox, Camino, OmniWeb,)except on Opera. Can anyone direct me in the right direction to solve this issue?

    Ok...
    1.) Unless it is a horribly designed site javascript not working would not prevent you from at least opening said site. You might not be able to use some of the features, or in the example of acual applications like gmail or then new yahoo mail you might not be able to use those at all since they are written soley for js. But for sites like VersionTracker it shouldnt make a difference.
    2.) Javascript is an interpeted language run on the client - ie the web browser. There is nothing to install. its part of the web browser youre using. You can uninstall and reinstall the browser itself but javascript is not a seperate component or something that is shared across applications that utilize it.
    Javascript is not the issue here at least in the case of versiontracker and 1010wins. I turned JAvascript off in my browser and visited both and they load jsut fine. Your eChalk mail might need js but i dont know about all that.
    So.... what happens when you try to visit one of these sites in one of the problem browsers???? Do you get a balck white screen? A server Error message? a DNS error? Does the app crash? etc..

  • When Firefox is open the zoom function (option/command/space bar) does not work in Adobe programs (InDesign, Photoshop, Illustrator)

    Mac OS X 10.6.7
    CS 5.5
    When Firefox is open the zoom function (option/command/space bar) does not work in Adobe programs (InDesign, Photoshop, Illustrator). This happens only when Firefox is open and when I close it the zoom functions work fine again without having to restart the applications.
    This is intermittent but happens quite frequently each day if Firefox is active.

    MDN doesn't mention -chrome being used for ordinary web pages: https://developer.mozilla.org/docs/Mozilla/Command_Line_Options#Chrome
    When I use
    firefox.exe -chrome about:permissions
    I get a usable window, but zoom doesn't work as you noted.
    How about using an intermediate page and window.open() for the target page? You can (mostly) restrict the chrome of windows opened that way, but it will leave behind the intermediate window...
    https://developer.mozilla.org/docs/Web/API/Window.open

Maybe you are looking for

  • Unable to find a data source in RSA5 which can be seen in RSA3.

    Hi there, I am unable to find the business content data sources in RSA5, but I can find the same data sources in RSA3 (extract checker). I need these data sources to be replicated to BW and take it up further. Any light on the above issue will be of

  • Difference between KP06 upload figures and S_ALR_87013611 output

    HI, I am using KP06 for uploading planned cost in BUD version . I entered amount 1000 . And when I see in S_ALR_87013611, the figure comes up as 4.92 . There is no mention of currency anywhere in KP06 or S_ALR_87013611 . Can you please tell me , if t

  • Videos not playing in iPhoto and iMovie

    I have tons of video in iPhoto that are not playing.  They show a preview thumbnail, then they show the "triangle and exclamation" error sign when clicked on.  The same videos appeared in iPhoto as recently as yesterday and worked just fine.  The sam

  • Building SDK CS6 for OSX 10.9 XCode 5

    As a fun weekend Photoshop project I thought I'd see what it took to write a Photoshop CS6 filter plugin.  So I downloaded the CS6 SDK and opened up the Dissolve sample.  Right away I see errors about not being to open Apple headers like Dialogs.h. 

  • ******Need help on shopping cart javaBean code*******

    Compiling the following code outputs the error that the javaBean curItem does not exist. However, my other code depends on a javaBean curItem. I don't understand why I cannot update the quantity property of a specific object (curItem) in the arrayLis