Why my Code does not work?

I'm doing so if a user selects an option button in a group of 2 (choice1 & lendemain2) the formula in the field "Total" changes.

This is the javascript in the field 'Total '.

//////////////////////////////////////////////////////////////////////////////

If (document. Group1 ('Choice1'). Checked)

{

Event.Value = (this.getField("WSAtotal").value + this.getField("SAandAdd").value);

}


Another yew (document. Group1(Choice2'). Checked)

{

Event.Value = (this.getField("NSAtotal").value + this.getField("SAandAdd").value);

}

//////////////////////////////////////////////////////////////////////////////

P.S. I don't know anything about javascript so I have just been Frankensteining this code from around the web.

All first if you have radio buttons that should be in a group of exclusion, to give them the same field name but the export values.

Radio buttons are fields, you must first access the domain object before testing the value of the field.

var oGroup = this.getField ('Group'); get the field object for the radio buttons named "group".

debugging help.

Console.Show ();

Console.clear();

Console.println ("Group field has a value of"+ oGroup.value ");

end debugging help;

Event.Value = ""; clear the value of the event;

If (oGroup.value == "Choice1") {}

the group object is "choice1."

Event.Value = (this.getField("WSAtotal").value + this.getField("SAandAdd").value);

}

If (oGroup.value == "Lendemain2") {}

the group object's value is "Lendemain2";

Event.Value = (this.getField("NSAtotal").value + this.getField("SAandAdd").value);

}

Tags: Acrobat

Similar Questions

  • Why this code does not work, its simple!

    Hello

    I know the myVISITORinfoFormdomain name, say, the name is myTextField25, but I do not know its full path! but, I want to make gray and read-only, so I put the code below (I put the cursor on the node 'myVISITORinfoForm' and selected the DocReady event)

    var c = xfa.resolveNode("myTextField5").fillColor = '192,192,192. "
    var d = xfa.resolveNode("myTextField26").fillColor = '192,192,192. "
    var e = xfa.resolveNode("myTextField25").access = "readOnly";
    var f = xfa.resolveNode("myTextField26").access = "readOnly";

    I also tried another field of myTextField26, I also kept the same code in the FormReady events initialization... but has not worked!

    myTextField25 and myTextField26 are positioned on the 3rd page of the mySubForm12 subform.

    Pls let me know wht miss me?

    Thank you

    Hello

    If you want to make each field read only and gray, so why not script directly in each of the two textfields?

    It's the two fields docReady event:

    this.fillColor = "192,192,192";
    this.access = "readOnly";
    

    You can only do this if the fields are not null (for example when the form is returned to you). In this case you would wrap the script in an if statement:

    if (this.rawValue === null)
    {
         this.fillColor = "192,192,192";
         this.access = "readOnly";
    }
    

    I don't think the way you declare variables and setting properties on one line will work. Also, the use of the xfa.resolveNode is not effective.

    Hope that helps,

    Niall

  • Why this code does not work in dreamweaver?

    <! DOCTYPE HTML >

    < html >

    < head >

    < style type = "text/css" >

    {body

    Width: 100%;

    height: 100%;

    margin: 0px;

    padding: 0px;

    }

    < / style >

    < / head >

    < body >

    < img src = "images/last.png" alt = "left" style ="width: 100%; "/ >

    < / body >

    < / html >

    When I put it in the tab code Dreamweaver html blank document page, it does not seem to load. Any suggestions?

    Are you sure that the image is in the folder named "images" last.png? Are you sure the image is to use the right color RGB and CMYK not the space.

    There's nothing wrong with the code that I can see. What happens if you try just text:

    Hello

  • Puzzled why this code does not work... (Update record) ASP/VB - please help.

    What I'm trying to do is to check two values of database and if they are what I said I want the code to run (record code update). Here's what I have:

    < % if (rsSoftwareRequests.Fields.Item("Approved"). Value) = "Yes" AND rsSoftwareRequests.Fields.Item ("EmailSent"). Value) = "False" then % >
    < %
    If (CStr (Request ("MM_update")) = "form1") then
    If (not MM_abortEdit) then
    'perform the update
    Dim MM_editCmd

    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_Intranet_New_STRING
    MM_editCmd.CommandText = "UPDATE SoftwareRequest SET EmailSent."
    =?, ApprovedByUserName =? WHERE ID =? »
    MM_editCmd.prepared = true
    MM_editCmd.parameters.Append MM_editCmd.CreateParameter ("param1",
    1, 50, 202 Request.Form ("EmailSent")) ' adVarWChar
    MM_editCmd.parameters.Append MM_editCmd.CreateParameter ("param2",
    202, 1, 255, Request.Form ("ApprovedByUserName")) ' adVarWChar
    MM_editCmd.parameters.Append MM_editCmd.CreateParameter ("param3",
    5, 1, -1, MM_IIF (Request.Form ("MM_recordId"),
    Request.Form ("MM_recordId"), null)) ' adDouble
    MM_editCmd.execute
    MM_editCmd.ActiveConnection.close


    ' add the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "software_hardware1.asp".
    If (Request.QueryString <>"") then
    If (InStr (1, MM_editRedirectUrl, "?", vbTextCompare in) = 0) then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    On the other
    MM_editRedirectUrl = MM_editRedirectUrl & "" &
    Request.QueryString
    End If
    End If
    Response.Redirect (MM_editRedirectUrl)
    End If
    End If
    % >
    < % end If % >


    The recordset is set above the statement 'IF '... I put these values in the HTML body to see if it is pulling them correctly and yet it is the code under the IF statement is not pull out... I don't understand?


    Any help would be appreciated. Thank you!

    I think that is the oder of your orders, I did a quick page to test and it works fine, I left the sql insert at the top of the page where DW put and I think all his money form if SO, was the order in my page like this:

    Insert code - report
    RS for the values-

    <%If (rsSoftwareRequests.Fields.Item("Approved").Value) = "Yes" AND rsSoftwareRequests.Fields.Item("EmailSent").Value) = "False" Then%>


    FORM code right after IF THEN exposed


    <% end if %>

    Notice the document.form1.submit () is inside the IF THEN statement so it will trigger if the FI THEN returns true and that is not the value of the onLoad of the body, it should work, I left the record insertion code where DW puts but try it inside the fi can. NOTE: If the user has JS disabled the page will not work, but there are risks to everything!

  • Why my license code does not work on lightroom 6 for mac?

    Why my license code does not work on lightroom 6 for mac? My os x is "el capitan".

    Please try the steps to serialize Lightroom CC trial to activate like Lightroom 6 mentioned on: https://helpx.adobe.com/lightroom/kb/serialize-lightroom-cc-trial-to-activate-as-lightroom - 6.html

    You can also try: error "serial number is not valid for this product". Creative Suite

  • Why my registration code does not work?

    I just bought Adobe Photo Shop Elements for MAC and provided in the box registration code does not work.  Now, I can't find my serial number.  I got the purchase at Best Buy and they told me that since it was open, I call Adobe.  I was not able to find the phone numbers for support and all redirects me here.  I really want to use this product before the weekend and now I'm beyond frustrated.  I did research on research and nothing helped.

    Can you help me?

    AA I mentioned above, I tried everything recommended on Adobe's Support site. I was not able to find something that works with your link above.

  • jQuery code does not work in phonegap

    Someone gave me a code https://jsfiddle.net/adeneo/2uod274d/ jsfiddle

    It works well in jsfiddle, but when I put the code in my Xcode and amended to incorporate my code and run it in the Simulator, the code does not work at all (i.e., no data is stored in the local storage)

    I am building an app for iOS with phonegap. JS:

    <script type="text/javascript" src="cordova.js"></script>
      
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
      
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>

      
    <script type="text/javascript">
      document.addEventListener("deviceready",onDeviceReady,false);

      function onDeviceReady() {

      document.getElementById("btnSave").addEventListener("click",saveData,false);
      document.getElementById("btnShow").addEventListener("click",showData,false);
    }

      function saveData(){
      var data = window.localStorage.getItem("date");

      var dates = data ? JSON.parse(data) : [];

      dates.push( new Date() );

      window.localStorage.setItem("date", JSON.stringify(dates));

      alert("Your data is stored");
      }

      function showData() {
      var data = JSON.parse(window.localStorage.getItem("date"));
      console.log(data);
      $('#res').html(JSON.stringify(data));
      $(this).html('Update result');
      }

    < /script >

    HTML:

    <button id="btnSave"> Save Data </button>

      
    <button id="btnShow"> Show Data </button>

    I don't know what is happening because the code works well in jsfiddle, but for some reason any just does not work in my phonegap.

    My version of phonegap 5.3.6 cordova version 5.3.3

    Post edited by: Fang Kerry, I added my complete code is easier to see the problem (if any)

    jQuery has nothing to do with this, as far as I can tell (so not sure why it is in your title). The problem is that the result of JSON.parse (data) is not an array, what you think it is, it's a chain. The chain respond well to 'push '. I get that when you use this code in jsfiddle he is somehow coming out as a table, but I think it must be because of something done jsfiddle. When I do the same commands in the console of my browser, I get a string, not a table, so your problem.

    Instead:

    function deserializeDates() {
        var data = window.localStorage.getItem("date");
        var dates = []; // worst case, we'll return an empty array.
        if (data) {
            try {
                dates = JSON.parse(data);
                 // handle the case that dates is a single item and not an array
                if (!(dates instanceof Array)) {
                    dates = [dates];
                }
            } catch (err) {
                 // the stored dates failed to parse for some reason; you might want to do something about it
                 console.log("Failed to parse " + data);
             }
        }
        return dates;
    }
    
    function serializeDates(dates) {
        window.localStorage.setItem("date", JSON.stringify(dates));
    }
    
    function saveData(){
         var dates = deserializeDates();
        dates.push( new Date() );
         serializeDates(dates);
        alert("Your data is stored");
    }
    
    function showData() {
         var dates = deserializeDates();
        console.log(dates);
        ...
      }
    
  • Why this SQL does not work?

    The following code does not work when I try to delete rows from a table of test. The test table has no unique or primary key on it and is defined as test (identification number). Can you explain to me why it doesn't work?


    delete from test a where a.rowid in (select b.rowid from test b where b.id = a.id and b.rowid != a.rowid);




    When I run the subquery (selection) with replacement of the actual values of a.rowid and the table queried a.id (IE.select b.rid from test2 b where b.id = 1 and b.rid != 'XXX'

    ), the subquery returns exactly as expected (that is to say, it gives the rowid is different from that which went from subquery). And as although I know the internal subquery must return the result for each row of the table in the outside circle delete statement, and only after that should execute the delete statement. For example, for the first row of the table in the external suppression, the delete statement must send the ID of the first row in the internal subquery and then wait the result which should return. And then runs the delete statement, in which case the subquery must return the rowid is different from that which went from subquery (ie.

    b.rowid != a.rowid

    ). Am I wrong? What is the error in this statement.


    P.S. The sql is also not working if we replace remove it with the update or select

    in this case, the subquery must return the rowid is different from that which went from subquery (IE.

    b.rowid != a.rowid

    ). Am I wrong? What is the error in this statement.

    You are right that this subquery should return other than past rowid thr. But you used the IN clause as well as below:

    where a.rowid in

    What States remove the line if rowid returned by the subquery contains the identifier for the row whose ID was passed. As the inner query is to return another rowid, therefore, no row is deleted.

    To remove duplicate lines, try the query (Replace tablename/columns with your) below:

    DELETE FROM emp A

    WHERE A.ROWID > ALL (SELECT B.ROWID

    PEM'S B

    WHERE A.empno = B.empno);

  • period overlaps the code does not work in apex page

    Hello

    Employees have a schedule with a start date and end. Calendar periods cannot overlap for the same employee.

    I have a function that returns the error of validation of text as follows:

    declare
    number of l_dummy;

    Start
    Select count (*)
    in l_dummy

    of fus_medewerker_roosters
    where mdr_code =: p61_mdr_code
    and <>id: p61_id
    and to_date(:p61_begin_periode,'DD-MON-YY') < = eind_periode
    and to_date(:p61_eind_periode,'DD-MOn-YY') > = begin_periode
    +;+

    If l_dummy > 0
    then
    Back to 'this employee already has a calendar in this period.';
    on the other
    Returns a null value.
    end if;

    end;

    But the code does not work. It records data of an employee even though the periods overlap.

    But the code works correctly in workshop:

    declare
    number of l_dummy;

    Start
    Select count (*)
    in l_dummy

    of fus_medewerker_roosters
    where mdr_code =: p61_mdr_code
    and <>id: p61_id
    and to_date(:p61_begin_periode,'DD-MON-YY') < = eind_periode
    and to_date(:p61_eind_periode,'DD-MOn-YY') > = begin_periode
    +;+

    If l_dummy > 0
    then
    DBMS_OUTPUT. Put_line ("this employee already has a calendar at this time."); end if;

    end;

    What goes wrong. Why it works very well in the Studio, but not in my page?

    Kind regards
    Diana

    Edited by: dianap on Sep 4, 2009 08:31

    Hi Diana,

    It comes with the following:

    to_date(begin_periode,'DD-MON-YYYY')
    

    and

    to_date(eind_periode,'DD-MON-YYYY')
    

    Here are the dates of the table itself, should not be converted to dates.

    Secondly and more important still, the list of selection of P11_MDR_ID does not return NULL, it returns "null %" - it is a string that should be converted to null.

    I have made a few changes for postings of these - please take a look and check that everything is working ok.

    Andy

  • Why this scriipt does not work with Firefox? &lt; embed src = "News2008Fall.pdf" width = '615' height = '3200' &gt; &lt; / embed &gt; "

    Please tell me why this script does not work with Firefox. It works with Safari. Here is the page that includes the script: www.lionsgatehoa.org/newslettertest.html. Thank you. Tom Engleman

    Here's the script in my html document:

    < embed src = "News2008Fall.pdf" width = '615' height = '3200' > < / embed > "

    Edit: removed # phone

    Works for me on Linux.

    Your system details list does not display the Adobe Reader plugin, so you'll have to (re) install this program.

    See:

  • Why my Skype does not work? "KERNEL32.dll".

    [The update by the moderator topic title should be more descriptive. Original section title was: "why my Skype does not work:------?']"

    It's saying "Fatal error failed to get proc for GetLogicalProcessorInfromation (KERNEL32.dll) address; __ ; someone help me?

    You must update your installation of Windows XP to the latest Service Pack 3 (SP3).

    https://support.Skype.com/en/FAQ/FA12388/why-am-i-getting-a-fatal-error-KERNEL32-dll-when-i-try-to-l...

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=24

  • Why Apple cards does not work in Saudi Arabia?

    Why Apple cards does not work in Saudi Arabia?

    Hi msmadi,

    I understand you are trying to use cards for Apple in Saudi Arabia, but faced problems. I don't know what questions you are running, but if you want to use a specific feature, it may not be available here. Take a look at the link below to review what features are available with an iOS device using iOS 9.

    iOS 9 feature availability
    http://www.Apple.com/iOS/feature-availability/

    Nice day

  • I would like to know why my hotmail does not work

    I would like to know why my hotmail does not work

    Rex

    I think it might be a problem with Hotmail right now because I have seen numerous amounts of threads, saying "cannot connect to hotmail. You could post your question Hotmail forums below and they will have probably more information about it.

    http://windowslivehelp.com/product.aspx?ProductID=1

  • Why CRYSTAL_REPORT program does not work with windows Vista? __

    Why CRYSTAL_REPORT program does not work with windows Vista?

    http://www.Microsoft.com/Windows/compatibility/Windows-Vista/default.aspx

    Windows Vista Compatibility Center

    First thing to do is to check its Vista compatibility at the link above, and if not to see what patches/solutions are available from its manufacturer...

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-compatibility-mode/

    If this is not Vista compatible, read the info on the link above.
    It works for some programs, but not all.

    This applies to software programs, NOT hardware drivers.

    If it's Vista compatible > uninstall it > Re-download/save to your desktop > right click on the setup.exe > run as admin.

    See you soon.

    Mick Murphy - Microsoft partner

  • A refurb Lenovo/IBM PC windows 7.0 SW, software code does not work for charging SW after a system restore

    A refurb Lenovo/IBM PC windows 7.0 SW, software code does not work for charging SW after a system restore. How can I get a new one

    Skip, enter the product key, and then complete the installation.

    Try the phone activation:

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

Maybe you are looking for