Converting formcalc to javascript.

Hi there,  I would like to know if i can convert an existing formcalc script to javascript and if so how can it be done?

The only way I know is "manually", means you have to write the scripts by yourself in the desired language.

Similar Messages

  • Help with respect to Formcalc r Javascript

    Hai Experts,
            Can someone help me with demo code using formcalc
             or javascript to append a new row on clicking enter on a field in a table.
      My requirement is : i have a table in my Adobe form as follows:
    <b>   Mat_no           Quantity              Plant.</b>
       when i create a adobe form and send it thru mail i able to see only one row in the table. if the user enters first row and presses enter one more should be inserted.
      can some one help me with some sample to achieve this?????
    Thanks and regards,
    Madhu

    Hi,
    You need to slightly tweak the logic here.
    Take another internal table and declare a field of type dbtable-field1.
    Now...
    TYPES: BEGIN OF t_tab3,
                   field1 TYPE dbtable-field1,
                 END OF t_tab3.
    DATA: itab3 TYPE STANDARD TABLE OF t_tab3,
               wa1 TYPE t_tab3.
    LOOP AT int_table_temp INTO wa.
    MOVE wa-field1 TO wa_wa1-field1.
    APPEND wa1 TO itab3.
    ENDLOOP.
    IF NOT itab3[] IS INITIAL. "This check is Mandatory
    select * from dbtable into table int_table_temp for all entries in
    itab3 where dbtable-field1 = itab3-field1.
    ENDIF.
    If your dbtable field has higher length, You can use the offset aswell but not the right way.
    WHERE dbtable+0(length) EQ comparision field.
    Thanks,
    Vinod.

  • Mix formCalc and javascript in same event?

    Hi Folks,
    I have a bunch of formCalc and Javasript I'm trying to merge (two different forms, different programmers).   Is it possible to mix javascript with formCalc in the same field event?   If so, how?
    thanks!

    No, it is not possible to mix FormCalc and JavaScript in the same event. You will get run-time errors.
    Steve

  • Formcalc or Javascript equivilent of =now() in Excel

    Could someone please tell me if there is a Formcalc or Javascript equivilent of =now() in Excel? I know there is that time function, but that seems to come out with a long number that doen't mean anything to me. I want to be able to tab into a field, and the field show the current system time in HH:MM format.
    Thanks.

    In JavaScript you would use the Date object:
    // Create variables
    var currentDate;
    var hours;
    var minutes;
    var formattedTime;
    // Get time
    currentDate   = new Date();
    hours         = currentDate.getHours();
    minutes       = currentDate.getMinutes();
    // Format time
    if (hours   < 10) { hours = "0" + hours };
    if (minutes < 10) { minutes = "0" + minutes };
    formattedTime = hours + ":" + minutes;
    // Display formatted time
    this.rawValue = formattedTime;
    In your case, you would put this script in the 'enter' event of your field.
    If you are doing this across multiple fields, it would make sence to implement this as a function in a script object.
    Ben Walsh
    www.avoka.com

  • Convert pdf by javascript

    Is it possible to use Acrobat to convert a web page (this web page with js http://funpage.it ) into a PDF and  retain some of the basic javascript functionality that previously  existed on the webpage?  Ie. Hide/Show of fields when a link is  clicked.  I'd like to be able to do this without taking any special  steps toward making the script compatible with acrobat if at all  possible.

    No. Converting a web-page to a PDF is basically printing it to a PDF
    printer. All interactive components will be lost.

  • Convert applescript to javascript

    I have a file which contains applescript. I need to convert this script to javascript  and run it in my windows. Please help!!!

    Muppet Mark seems right.
    Translating APS to JS is someway doable. Unless the APS script uses cmd that don't have matching items in JS, it shouldn't be a problem.
    However, I don't think a script may convert  all by itself an APS script to JS.
    For generic commands such as "set x to" or "display dialog", it's quite easy but how to translate "whose", "starts", "first", "last"....?
    What if the script goes for file on the system using a tell application "Finder" block ?
    In my opinion, the translation process can only be efficiently done by a someone knowing both languages.
    Can I help you ?
    Loic

  • Can a code in FormCalc Or JavaScript be reused

    Hi,
    Does somebody know if we can share / reuse  existing code like JavaScript Function or FormCalc between
    different forms ?
    Thanks !

    Hi Oren,
    We did something similar recently, using a Fragment Library on a shared drive. One of our fragments includes javascript and it works fine.
    However, we only found how to use fragments as embedded, not referenced. Still that allows you to code once and easily pull the fragment into other forms. (Referenced would mean changes to the fragment in the library would show in all referencing forms. We don't know how to do that. If you figure it out please post!)
    Let me know if you would like more details.
    Hope this is helpful!
    Margaret

  • Converting Actionscript to Javascript

    When I think of the Cappucino framework. It converts Objective-J to pure Javascript in the browser no plugin required because the compiler itself is in Javascript.
    I am thinking, why dosen't Adobe do the same with Actionscript?
    Is this something feasable?

    I've spoken to a few people who think that an "Export to HTML(5)" option in Flash Pro would be awesome.  I have no idea how something like that would work, or if it is even possible.
    The Flex Framework relies heavily on Flash Player APIs.  I suspect there are not standard 'JavaScript' parallels for many if those APIs.

  • Setting Exclusion Group to Required in FormCalc or Javascript

    Hi
    I am looking for the syntax to toggle an Exclusion Group to required or optional
    For regular text fields I am using field.validate.nulltest="error"  or field.validate.nulltest="disabled" however for the exclusion groups thats not working.
    HELP
    Suggestions?
    Meir

    Hi
    Thanks for your response. It seems the code was ok the problem was that the behaviour of the exclusion groups is different depending on Version and wheter the form is static or dynamic.
    Again thanks for your response
    Regards
    Meir

  • Convert HTML/javascript AIR app to flex-based AIR app?

    Hi all,
    I've already built an AIR app using HTML/javascript that I
    would like to monetize.
    I would like to use O2app's E-Commerce framework, which right
    now only supports Flex-created AIR apps.
    My question: Is there a simple way to "convert" an
    HTML/javascript AIR app to Flex 3 format? I'd rather not have to
    rebuild the app from scratch in Flex 3 if I don't have to. :)
    Thanks,
    Al

    Hi,
    There's no simple way to convert an HTML AIR app to flex.
    But it is possible to create HTML Root windows from a Flex
    AIR App. By root window, I mean the same kind of window that is
    launched when you launch an HTML AIR App.
    For more info, look at the HTMLLoader.createRootWindow()
    call. (This will be available from a Flex AIR app as well)

  • Converting excel formulas to javascripts

    Hello, I am not experience in Excel formulas and creating "if" statements in Adobe Acrobat, so I'm hoping someone can help me with this. I have two problems.
    1.  Here is an excel formula that I need to convert over to javascripts. Can someone help with this?
    =IF(Q13>0,Q13+0,"")
    2.  Here is the second one,
    =IF(N16*Q16>0,((N16*Q16)+U16),"")
    In addition to these two formulas I need help with, the owner of the forms does not want the numbers to round up. Is there a way to get the exact answer and not rounding the numbers up in javascript?
    Thanks for your assistance.
    I have Adobe Acrobat X.

    Hi George, on the first script
    var Q13 = +getField("Q13").value;
      event.value = Q13 > 0 ? Q13, "";
    It comes up with a SyntaxError: missing : in conditional express 2: at line 3
    Do you know what that means and how to correct?
    Thanks
    Connie

  • Convert from int to byte in JavaScript

    I have a small piece of code in Java,
    int x = 216;
    System.out.println((byte)x);
    I'd like to convert this to JavaScript form and that means, I want to be able to get the exact answer from this code which is -40. How do I do that?

    What do you mean with
    I'd like to convert this to JavaScript formThere is nothing like a JavaScript form.
    Within a JSP page you can write
    <script type="text/javascript">
       alert("<%=String.valueOf((byte)216)%>");
    </script>Which displays an alert box with the message "-40"

  • Calculation in Javascript or FormCalc "to the power"

    Hi,
    How can I caculate the following expression using either formcalc or javascript. The Expression pow(x,y) doesn't seem to be recognized.
    Expression: BSA.rawValue = pow(height.rawValue,0.45) * weight(weight.raxValue,0.72)
    or BSA = x^0.45 * y^0.72
    I couldn't find the answer in the forum.
    Thank you for your help,
    Olivio

    In Javascript the command should be:
    Math.pow(x,y);

  • Converting Simple Indesign AppleScript to Javascript

    Hi,
    I have been using as imple Indesign AppleScript but need to convert it to javascript and have no prior experience.  I've been reading the Adobe pdf about scripting and it is great as it shows the differences between the 3 (as, js, vb) but I'm still having trouble figuring out how this would conver.  Would anyone be able to show me the converted result?
    AppleScript:
    tell application "Adobe InDesign CS5.5"
         tell every document
              set visible of layer "Interactive - Web" to true
              set visible of layer "Interactive - Print" to false
         end tell
    end tell
    Javascript:
    var myDocuments = app.documents.everyItem(); // something like this?
    It hides/shows the visibility of 2 specific layers for all opened documents.  I pretty much need to hide/show 2 specific layers ina  book and this should/can accomplish that.
    Thanks for any help!

    This should work:
    var documentsArray = app.documents.everyItem().getElements();
    for (var i = 0; i < documentsArray.length; i++) {
              var document = documentsArray[i];
              var layers = document.layers;
              layers.itemByName("Interactive - Web").visible = true;
              layers.itemByName("Interactive - Print").visible = false;
    Also, it might be possible to do this without using "getElements" which "resolves the object specifier", eliminating the need for the "for" loop. Something like this:
    app.documents.everyItem().layers.itemByName("Interactive - Web").visible = true;
    app.documents.everyItem().layers.itemByName("Interactive - Print").visible = false;

  • Reader 9.3.1 not working with FormCalc in LiveCycle 8 forms

    My agency has recently upgraded to Adobe Reader 9.3.1. I have a fillable form I created using Livecycle Designer 8 in Acrobat Professional 8 and distributed to agency staff using the "distribute" function in Acrobat Professional 8. The form includes formcalc scripts that use the DocReady and other events to create a unique identifier comprised of data from the form, and to calculate totals. The formcalc scripts work as long as the form is opened in Acrobat Professional 8 or Adobe Reader versions prior to 9.3.1, but don't seem to fire at all with Reader 9.3.1.
    I've been told by my agency IT staff that I need to upgrade, but before I go to that expense, I'd like to know whether this is necessary or guaranteed to fix the problem. I've also seen other posts that suggest that that Acrobat 9 handles exporting the data differently (no longer exporting to a .csv file) and that also concerns me, as I've set up automated processes using the .csv output. Upgrading may introduce new problems, for all I know.
    It seems unlikely that Adobe would intentionally make Reader 9.3.1 not backwards-compatible with forms created using older versions of LiveCycle, as that would cause hugh headaches for their customers, so I'm wondering if this is a bug that will be soon fixed?
    Thanks, Alice

    Hi Alice,
    I really don't think the problem is using LC Designer 8. We have several forms that were developed in LC Designer 8 (with FormCalc and Javascript), that still function in Acrobat/Reader 9.3.1.
    There are two potential issues. The first is the most likely.
    In the new installation of Reader 9.3.1, JavaScript is turned off. See this blog and sample: http://blogs.adobe.com/livecycle/2009/02/adobe_reader_disabled_javascri.html
    If you send the sample to the agency, a warning will appear if they open it and Javascript is turned off. When they turn javascript back on in the preferences, then your form should work again.
    The second issue can be a little more trouble. Adobe have introduced a new Javascript Blacklist Framework in Acrobat/Reader 9.3.1, which can disable FormCalc and JavaScript if it contravenes the framework. See these links:
    http://kb2.adobe.com/cps/504/cpsid_50431.html
    Managing JavaScript Execution in the Acrobat Family of Products
    As I say, unless your FormCalc is trying to access external resources, I suspect that Javascript is turned off in Reader. I don't think you have to upgrade Acrobat/LC Designer.
    Hope that helps,
    Niall

Maybe you are looking for