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?

Tags: Acrobat

Similar Questions

  • Need help with the button mute on my helmet XL-3000 of Microsoft Chat, please!

    Hi all!  Hope everyone is having a good TGIF!  If you use my helmet even, I need help understanding the region button mute in the middle of the rope.  The red light is on or off?  I suppose that if I hit the curve button with the microphone on this subject, and the red light, I'm turn off my mike?

    I did some tests with others on the phone calls.  Sometimes, some other hear me, sometimes they do not have.  BUT I NEVER HEAR THEM!  FOR MY WORK, IT IS IMPERATIVE THAT I MAKE CALLS TO OTHERS!  HELP PLZ!  Thank you very much and have a great wkend!

    Hello
     
    Please follow the links below to troubleshoot the computer.
     
    Method 1
     
    Connect one microphone, music player or other audio device to your computer

    Method 2

    Step 1

    Troubleshooting: headsets

    Step 2

    Open the troubleshooting of Audio recording

    Method 3

    How to adjust the microphone volume

    a. click Start, type mmsys.cpl in the search box and press ENTER.
    b.
    in the sound dialog box, click the recording tab.
    c. click Microphone, and then click Properties.
    Note Make sure that the work appears under Microphone. If the job does not appear, click Microphone, and then click on set as default.
    d. the Microphone Properties dialog box, click the custom tab.
    e. select or clear the box amp Microphone.
    f. click the levels tab.
    g. set the volume to the desired level, and then click OK.
    h. click OK to close the sound dialog box.
     
    How to adjust the setting of the voice
     
    a. start the game.
    b. connect to LIVE (the Guide).
    c. click personal settings.
    d. click on voice.
    e. make sure that the recording volume level indicator records at a bar when you talk.
    f. click done.

    If you are still facing problems then, I would say that you contact support for Microsoft hardware for more direct intervention.


    I hope this helps.

     
  • 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.

  • Need help with javascript used to check the data in the mandatory radio button fields

    required_fields

    I get a syntax error (SyntaxError: missing: after the id property 17; at line 18).  I am trying to run a script to verify data in all the fields required radio button before letting the user to submit the form (or save).  Here is the code I use:

    var AllRequiredFieldsSet = true;

    for (var i = 0; I < this.numFields;i++)//loop through all form fields)

    {

    var fldName = this.getNthFieldName;

    var currentFld = this.getField (fldName);

    if(currentFld.type=="radio")

    {

    All the radios that are needed to see if the user filled their

    if(currentFld.Value=="OFF")

    AllRequiredFieldsSet = false; one of the option boxes has not been selected, this form cannot be sent

    }

    }

    If (AllRequiredFieldsSet is false)

    App.Alert ("all the required areas have not been met");

    on the other

    this.submitForm ({cURL"mailto:EMAILADDRESS@gmail.com", cSubmitAs: "PDF"});

    Miss me not all media... Any ideas on what I'm missing?

    Thank you! Judy

    These two lines should fix things:

    var fldName = this.getNthFieldName (i);

    ...

    if(currentFld.type=="RadioButton")

  • Need help with Javascript automated e-mail

    I am trying to modify a form to add a button that takes the values of the fields that will be filled in by the user and then send an email using these fields

    currently I have the following script:

    var A = xfa.resolveNode("topmostSubform.Page1.Work_Order__").rawValue;
    var B = xfa.resolveNode("topmostSubform.Page1.NOMENCLATURE").rawValue;
    var PPC = xfa.resolveNode("topmostSubform.Page2.Email_Address_PPC").rawValue;
    void var = 'work created order. "
    var msgBody = "Order of work" + A + "\n for the" B + "program has been created"; "."
    app.mailMsg ({}
    bUI: false,
    cTo: PPC,.
    bassujetti: void.
    CMSG: msgBody,
    });

    Thanks for your help,

    John

    Hi John,.

    Your script looks not too bad. Here is our generic script:

    var vEmail = "[email protected]";
    var vSubject = "A Subject for your email";
    var vBody =  "Put your body message here...";
    
    event.target.app.mailMsg({
         bUI: true,
         cTo: vEmail,
         cSubject: vSubject,
         cMsg: vBody
    });
    

    Try putting "event.target." before the app.mailMsg. Also you need not of the xfa.resolveNode, if the items, pages, and the subofrms are appointed.

    Hope that helps,

    Niall

  • I need help with my button to post a link to my Web site! EMERGENCY AID!

    Hello everyone. Recently, I tried to link a button on my site with Action Script 3, however, whenever I try to load my film, I get an error! The error that says: scene 1, Layer 'Button', frame 1, line 5 1071: syntax error: produce a keyword of the definition (for example, the function) after attribute fuction, no PSE.


    That's what I wrote...


    Stop();


    peshp_btn.addEventListener (MouseEvent.CLICK, PSE);


    Fuction pes(e:MouseEvent):void {}

    var pesLink:URLRequest = new URLRequest ("http://www.penguinentertainmentstudios.com");

    navigateToURL(pesLink,"_blank");

    }



    PLEASE HELP ME I HAVE IVE SUMMER TRYING NOW FOR ALMOST 2 HOURS!

    Use the following syntax:

    peshp_btn.addEventListener (MouseEvent.CLICK, PSE);

    function pes(event: MouseEvent) {}
    var pesLink:URLRequest = new URLRequest ("http://www.penguinentertainmentstudios.com");

    navigateToURL (pesLink, "_blank");
    }

  • Need help with javascript...

    I have a form that I want to send. When it creates the email, I have a script which inputs e-mail sender, a subject line that between the body of the text, including the name of the employee as well as the date and the name of the person completing the form from the "empName" field specified in the field 'weekend '. I want to add the totals for each line (regular, vacation and sick). For some reason, the script stops when I try to add row grand totals. When it works, here is my script:

    var oDoc = event.target;
    
    oDoc.mailDoc({
    bUI: true,
    cTo: "[email protected]",
    cCC: "[email protected]",
    cSubject: "Weekly Employee Time Summary for "+empName.rawValue,
    cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue
    });
     

    If I just add one line totals, the Send button does not work. Here is the code with the addition of a line total:

    var oDoc = event.target;
    
    oDoc.mailDoc({
    bUI: true,
    cTo: "[email protected]",
    cCC: "[email protected]",
    cSubject: "Weekly Employee Time Summary for "+empName.rawValue,
    cMsg: "Attached is the Weekly Employee Time Summary for "+empName.rawValue +" for the week ending "+weekEnd.formattedValue +". Vacation Total: "+vacTotal.rawValue
    });
     

    Any ideas why it's a failure? Attached is the file itself

    https://drive.Google.com/UC?export=download & ID = 0B3ZhSiIWrwvWUUhfa0hCZlJFX00

    You must write the path to the object, you cannot access the object if it is in the same subform or if it has a similar parent

    You should write this to access your total value inside the table

    Table1.vacation.vacTotal.RawValue

  • Need help with Javascript to get the value of standard report column

    Hi all

    Apex 3.1 version

    I have a query SQL (editable report) region where I need to do validations using a process of OnDemand and javascript. For this posting, I need to use the serial number and id of this same report line item. The function is called when the serial number is changed. I can get the serial number easily because it is a text field, however, the item id is a standard report column (which actually a text field or hidden gives me a checksum error, long story). How can I get the value of the standard report column to set the value of an element of the Application to use in my process of application as well as the serial number? Here is my code below.
    <script>
    
    function f_ValidateSerial(pThis)
    {
        
      // The row in the table
    
      var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    
        //alert('Row is '+vRow);
    
    
      // Display the serial number
        //alert('The Serial Number is '+html_GetElement('f21_'+vRow).value);
    
      
     var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateSerial',0);
     get.add('F101_SERIAL_NUMBER',html_GetElement('f21_'+vRow).value);
     get.add('F101_INVENTORY_ITEM_ID',+html_GetElement(?????+vRow).value);   // Here's where I need to get the item id to set application item!!
     
     gReturn = get.get();
     
    if (gReturn)
        { 
          alert(gReturn);
        }
     
      if(gReturn)
        { 
          html_GetElement('f21_'+vRow).value = '';
        }
               
    }
    </script>

    Hello

    Ok

    Item ID is standard report column.
    If you enter this Expression HTML column

    #ITEM_ID#
    

    I guess that the substitution of column item Id is #ITEM_ID #.

    Now, you have hidden input form that is not submitted.
    Then in JavaScript

    get.add('F101_INVENTORY_ITEM_ID',+html_GetElement('item_id_'+Number(vRow)).value);
    

    Kind regards
    Jari

  • Need help with Javascript calculation hidden values.

    See the problem down below. Thank you.

    Calc_Problem.jpg

    This line is incorrect:

    (TotalValB - CostBasB) = this.getField("NV_B").value;

    Replace with:

    this.getField("NV_B").value = (TotalValB - CostBasB);

  • Need help with JavaScript web application form.  Need to limit the pixels and the size of the image

    I build several forms for www.iswapusa.com and on the site, visitors are asked to upload images, I want to restrict the width in pixels max 400 pixels and size to maybe 1 MB to 3 MB of the file images if possible.  If there is a code to do this, please let me know and where do I put it on business catalyst system. to work with forms I create or even if I have to give to each form.  The forms are available from one of these pages offer commercial or Non-commercial offer.

    I found the answer to my problem.  It is not a java solution, but a simple code.  You can create in your retail or list view depending on where you want the images appear of your form will be mailed.  the answer was in a previous post, and the link is:

    Dynamically generating thumbnail images

    The code I used was:

           

           

           

  • Need help with JavaScript/region templates and APEX (Show Hide region)

    I have a page that I am building where I want to use a form of a page but the swap areas (without reloading the page). In my example form, I have 3 areas I want to talk about as general, Major, Standard. I have them where they will be show and hide but the result is not satisfactory, because even if the region is hidden, the white space remains there where he was. Basically I want the form to continuous flow when the effect is that Standard replaces the more important or Major replaces the standard when you change the menu drop down.

    Link to the example on apex.oracle.com: http://apex.oracle.com/pls/otn/f?p=23948:1
    Developer Access:
    workspace: dapullia
    username: guest
    password: demo
    The application number is 23948

    Hello David,.

    Instead of the "visibility" of switching you must pass the 'view' of the 'block' to 'none '.
    If your code should be something like this (using the notation of APEX javascript library)

    $x("MAJOR_EVENT").style.display = 'block ';
    $x("STD_EVENT").style.display = 'none ';

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Need help with sizing and save files in batches

    Hi need help with a project.

    I have thousands of vector files that I need size of 350px X 350px, and then place it on a work plan x 600px-600px.

    Then I need to save it to the web as a PNG with a transparent background.

    Could I do a script for? or is there another way to do it in batches?

    I wouldn't have to open them one by one and resize the work plan then the image and save it one by one as that would take forever.

    Any help some suggestions would be greatly appreciated.

    ID do as a series of actions photoshop if the end result is png,

    pro image processor can help you make automatically, if you must resize batch additional... >

    https://sourceforge.NET/projects/PS-scripts/files/image%20Processor%20PRO/v3_2%20betas/

    I think that your work can run in a few steps, but for simplicity, I would like to start / test with a new photoshop action recording

    Open a file, change the size of the image to 350 x 350

    Change the canvas size,

    then save under...

  • Need help with buttons!

    Hello someone!

    The thing that I would need help with is the buttons that moves... Say there are 2 buttons on the stage, when someone clicks the button, the button from left to right movement and opens something when it stops there. So long it's fine for me, but now the peal problem.

    The thing is I want the button now on the right rear to place there where appropriate when I click on a button of the second (and it goes right to the place). When I do now the first button remains in place right... Do someone know what to type in Actionscript?

    Please help me... [email protected]

    what you use now which causes your keys for you move?

  • I'm suddenly needing help with my browser Firefox (6.0.2)

    Hello
    I'm suddenly needing help with my browser Firefox (6.0.2)

    (OS: I use Windows XP).

    When I open the browser, I don't see is a totally white screen of white, with all the toolbars at the top.

    I know that my physical connections are very good: I have tested the modem, turned the pc market etc and I can also receive/send emails.

    This problem started today, September 8, 2011 and has never happened before.

    Is it a coincidence that Firefox itself to day before I disconnected yesterday evening? Could this be something to do with this particular new update?

    I also noticed that just before I "opened" Firefox, I now get a small box indicating:

    [JAVASCRIPT APPLICATION]
    Handl exc in Ev: TypeError: this oRoot.enable is not a function

    This never appeared before - I hope that it offers a clue has what is wrong.

    The browser not be stuck in Mode safe, said by the way.

    Of course, I can't find solutions to the problem on the internet, I don't physically see all Web sites!
    (A friend sends this request in my name from their pc)

    Any light you can throw on this problem of confusion would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.

    If the only option is to uninstall Firefox and reinstall from your site, I'm also in trouble (I can not see the internet or download).
    In this case, would you be able to send the .exe file as an attachment to my e-mail address? In the affirmative, please let me know and I'll give you more details.

    Thanks in advance.

    One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Need help with the installation of an adapter of Palit GeForce 9500GT Super chart - 512 MB in a M2N68 (narrated

    Need help with the installation of an adapter of graphics Super Palit GeForce 9500GT - 512 MB - DDR2 SDRAM in a M2N68 motherboard (narra6). Should I disable the onboard graphics in the bios? When the card is installed, no VGA work outs and the PC does not start. Checked and recontroler implementation of the card in the PCI slot. PC is a desktop HP G5200uk PC. Windows 7 operating system.

    Hello

    The link below is a guige to install a video card in your Pc.  In particular, it seems that you will have to perhaps specify the location of the new card in the bios and save this change before you install the new card - see step 4 in the guide on the link below.  If your new card fits into the PCI Express x 16 slot, you will need to define PCI Express in the bios and save the changes.

    http://support.HP.com/us-en/document/c01700855

    Kind regards

    DP - K

Maybe you are looking for

  • HP Pavilion Elite m9470 Desktop PC VISTA' "XP need drivers for XP!

    Hello, before sorry all abaut my inglish.I bought this "HP Pavilion Elite m9470 desktop PC", but it comes with VISTA and VISTA and just don't get along... so I format and install XP, the problem is I can not find drivers anywere for chipset, audio ne

  • HP ENVY Phoenix 810 - 370st: upgrading Ram for my HP ENVY Phoenix 810 - 370st

    I have 16GB in my HP ENVY Phoenix 810 - 370st, with room for another 16. I've been looking for affordable options to upgrade, but does not know how much pine should I get? It seems that the most common options are 240 and 204... or was a Dyslexic? Is

  • Loop with Timeout

    Hello! is - that someone tried to set up a custom test step that performs a loop failure, until a timeout occurs? Unfortunately, this is not one of the default option in TestStand loop. I try to test an asynchronous system with signal delays and want

  • EA6300 cannot read my external storage but can my Netgear

    Hello I have an EA6300 who want to replace my Netgear R6100 with.  The router and WiFi work very well, but when I plug in my external USB 3.0 1 TB drive, the Linksys router does not recognize formatting, I get a "formatting not supported or the drive

  • BlackBerry Smartphones does not start, quick flashing bright red Please HELP.

    Good then today I swapped from a 7130e to a 8330 (verizon) I managed to remove the old political security using Jl_Cmder (which worked fine) and I got rid of the firewall so issue. Phone was working fine until I tried to use the device switch Wizard,