Problems with saveAs form using Javascript

I created a form using Acrobat X Pro. I have activated additional features so it will save.

The form has a "Save form" button with the following code of Actions:

var FileName = ' / H/docs / "+ this.getField("Last_Name").value +" "+ this.getField("First_Name").value +"2012.pdf Evaluation. "

this.saveAs ({cPath: FileName, bPromptToOverwrite: true});

The screen is located in a directory on a server (is not stored locally on the PC). The formula works very well, every time. If I click on save button, it allows to save the form with the new name in the path of the affected server. But if I open it from another PC on the network, nothing happens when I click on the save form"" button. But the reader allows me to record using file-> save as-> PDF on the menu?

What I am doing wrong? Saves the form one way but not the other? Why Javascript does not work?

Any help will be greatly appreciated.

I'm surprised that you can get this code works in a button. It is not there because it featured a privileged context, as a function of confidence in a script to the folder level. Here is a tutorial that explains the details: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

Tags: Acrobat

Similar Questions

  • Problem with SaveAs function using random paths.

    The installation program:

    Part 1) I have a script to the folder level that allows me to exercise a SaveAs function within forms. I'm doing this as a way to save the document quietly in the background. The effect is that the file is replaced with a copy of itself. The script is:

    var mySaveAs = app.trustedFunction (function (oDoc, cPath, cFlName)

    {

    app.beginPriv ();

    cPath = cPath.replace(/([^\/])$ /, ' $1 / ');

    try {}

    oDoc.saveAs (cPath + cFlName);

    } catch (e) {}

    App.Alert ("error during save it");

    }

    app.endPriv ();

    });

    Part 2) of my documents, I have to check by calling the function below:

    function runSave()

    {if (typeof (mySaveAs) == 'function') {}

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

    var myFileName = pathArray [pathArray.length - 1];

    cPath var = this.path.slice(0,myFileName);

    mySaveAs (this, cPath, myFileName);

    } else {}

    App.Alert ("Missing Save Function\n" + "Please contact forms administrator");

    }

    }

    Part 3) I have several large forms that use automatic recording to call save work according to a time interval of 5 minutes, using:

    app.setInterval (runSave (), 300000);

    The problem:

    Part 1) automatic backup function works very well and it works silently in the background. However, I started having problems when I open two forms at the same time. If, for example, I have a form of an open folder and open a form from a second folder, the save feature will sometimes save the active document in its original folder (as expected, crashing and creating an automatic registration) or sometimes save to original folder of the second document. This leaves me a copy update (automatic check) of the document in the right folder, and a copy not updated in the original folder. This seems to vary on what document I opened finally or document that is currently active. Although I can't find the right combination.

    It's like thinking what is to confuse the "this.path.

    Part 2) worse, if two documents have the same name, as is often the case with these forms, any incorrect saving deposit causes a crash of the second document and data loss.

    Part 3) makes it maddening, as sometimes happens when no record or the second second document is open. Instead, damaging it saves the active document in a recently viewed folder. For example, I'm going to open a local folder and open a Word doc, close the file and the doc, go to another folder in a different root (a folder in network), open the form and automatically saves it on the local computer in the folder with the Word doc. So now not only do I have a copy not updated in my folder, I have no idea where the updated copy was actually saved to until I met some time later.

    Part 4) once again, worse still, the previously viewed folder could happen which contains a document with the same name, and that the document is crushed by the automatic backup. I have no idea that the form was crushed until I sometimes open a little later and see that it contains a completely different form data.

    What is happening and how it stop?

    Adobe Acrobat X Pro on a PC.

    The code for this tutorial is unfortunately wasn't working, I discovered recently.

    This is my own personal code for a trust saveAs method. Note that it takes 2 parameters, not 3.

    safeSaveAs = {app.trustPropagatorFunction (function (doc, vPath)}

    app.beginPriv ();

    doc.saveAs({cPath:vPath});)

    app.endPriv ();

    });

    myTrustedSaveAs = {app.trustedFunction (function (doc, vPath)}

    app.beginPriv ();

    safeSaveAs (doc, vPath);

    app.endPriv ();

    });

    You call it like this:

    myTrustedSaveAs (this, "/ c/temp/test.pdf");

  • When we publish a Web site create in MUSE, the server must be linux? Please let me know because I have the problem with the form works... now the server that I use is the window...

    I am trying to publish in my domain on windows server, but I have a problem with the form...

    The server must be linux to work the form?

    Thanks in advance for your help...

    Thank you Brad... but how can I understand if a Linux server support? I try to do something in particular?

  • Problem with contact form

    I don't have the same experience in the Web design, but I create a using Adobe Muse. Everything works on the site expect Web contact form. If I use a gmail account I get the form but or my domain email I get nothing. I am in contact Godaddy for help but they don't know what to do...

    The domain is ensmarble.com. Can someone help on this topic?

    What should I do or how should I solve this problem?

    Thank you.

    Hi filiper79629728,

    There is an easy solution if you use GoDaddy's Web hosting.  Just a warning, this only works if you use GoDaddy Web hosting and forms of the Muse.  This isn't a problem with Muse for as long as it is a setting that needs to be adjusted on all that the host you are using.

    1. Place the shape in the Muse. Make sure to add the correct settings, that is, the e-mail address that will receive the forms.
    2. Next step is to navigate to your cPanel on GoDaddy.  This is where you manage your web hosting.
    3. On the main page of cPanel, scroll up to where it says ": Email".
    4. Click on "MX", which is located just below the 'accounts '.  This is the mail server setting.  By default, GoDaddy assume you are using a GoDaddy mail account.
    5. Make sure "Remote mail server" is checked on and that "Local mail server" is turned off.
    6. Your form should now be functional.

    The problem with the forms of the Muse and GoDaddy is that GoDaddy assumes that you will welcome your emails via GoDaddy.  If you have configured an e-mail address for your shape in the Muse that isn't an e-mail address hosted GoDaddy, GoDaddy and then do not accept by default. You must give permission to GoDaddy to send a form to what GoDaddy considers that an email "at a distance".

    I hope this works for anyone who has struggled with form when using of Muse forms that are hosted on GoDaddy servers.

    Thank you

    Ankush.

  • I'm having a problem with a sound used for Norton ccSvcHst.exe process. And perhaps dwm.exe

    I'm having a problem with a sound used for Norton ccSvcHst.exe process. I have all the dates of the last mounted and I roughly 1 000 000 errors page an hour and the hard drive of my computer is crazy with me doing nothing. Norton has been included in the software package supplied with the computer. so I hope that support you. What can I do to calm my computer runs to stop this service... I have also about 500 000 for the service dwm.exe. What could cause this?

    Hi dude, on average

    A. from when what happens?

    B. recent changes made on your computer?

    C. you get any error message?

    First of all, I suggest you to uninstall and reinstall Norton using the Norton Utilities disk and check if the problem persists.

    Second, you may have to perform an auditor of the system files on your computer in order to replace the files corrupted on your computer.

    Open an elevated command prompt. To do this, click Start, click programs, accessories principally made, right-click Guest, and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on allow.

    Type the following command and press ENTER: sfc/scannow

    The sfc/scannow command. analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833

    Bindu S - Microsoft Support
    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • I'm having a problem with my dropper / use pencil. I click on the color I want, but when I use the pencil or the brush is a contrasting color. I don't know if my photoshop is damaged, or if I changed some setting by mistake.

    I'm having a problem with my dropper / use pencil. I click on the color I want, but when I use the pencil or the brush is a contrasting color. I don't know if my photoshop is damaged, or if I changed some setting by mistake.

    Check if your pencil/brush painting Mode, or the layer is another than Normal.  For example, you will get the contrasting color, if the Mode is the difference or Exclusion.

  • I have problems with the form widget. When I created my forms, I need to leave out the line, one email because my client does not want the message line and two because those who have tried to fill the online form cannot submit because that box "email".

    I have problems with the form widget. When I created my forms, I need to leave out the line, one email because my client does not want the message line and two because those who have tried to fill the online form cannot submit because the 'email' box keep rejecting their email address valid. And I just tried to remove the line in my form and it does not allow me to delete or to mark it as not necessary either.

    Currently, there is no way around the field email forms of the Muse. Another option is to have a look at Jotforms or another third-party provider of shape that Muse has widgets for.

  • The two problems with sub form of table, associated with check boxes

    Hi all -
    Jari already helped me thereby once last week, but I'm running into some new questions.

    http://Apex.Oracle.com/i/index.html
    workspace: Leppard
    username: Guest
    PW: app_1000
    Application: MyTestApp

    Maybe I need to split these into two questions, if so just let me know.

    Question 1: On the first tab (tab 1 report) I have a simple tabular presentation based on the EMP table. The column of the box on the far right, when checked restores the Ename column readonly. The problem is that it only works one way. Unchecking the checkbox is not cancel the read-only.

    It is javascript code that I have on the page:
    function test(pThis) {
     //get the current row index on change
     var currIndex = $('input[name="'+pThis.name+'"]').index(pThis);
    
     // check current items value (return value of lov)
     if (pThis.value=='Y') {
      $('input[name="f02"]')[currIndex].style.backgroundColor = "LightGrey";
      $('input[name="f02"]')[currIndex].readOnly=true;
    }
    else if (pThis.value=='N') {
      $('input[name="f02"]')[currIndex].style.backgroundColor = "Red";
      $('input[name="f02"]')[currIndex].readOnly=false;
    }
    }
    The attribute of the element on the checkbox column is
    onClick="javascript:test(this);" 
    (It seems to work although I use onClick or onChange so I don't know if that makes a difference).

    But the main problem is that the code does not recognize the value of "n" in the column. I checked with firebug and columns I have untick are definitely on 'n', but I can't get javascript code to recognize this value. Even if I take the "ElseIf" code and just change the first part to (pThis.value ==' no) still does not work. There seems to be something with the value "n" recognize themselves do not, but I can not understand.

    Question 2: on the second tab - tab report 2. The same report but this time, I use a javascript character counter similar to that described in the sample application of the Dene (page 276 > http://apex.oracle.com/pls/otn/f?p=31517:276:19207673535900:NO). The counter of characters on the Ename field include javascript and an expression of HTML on the Ename column. The counter works fine, but now, the javascript code to make the column readonly work over all.

    Any ideas on these are much appreciated!

    Thanks in advance,
    John


    • Please please understand what HTML is generated and how to inspect. Once you do this, you can easily eliminate many problems with selectors not seeming to work. A text box is not an input for example element.
    • Boxes rely on the checked, not the value property. Apex circumvents this by creating a hidden extra element which will get the value based on the checked property of the visible checkbox
    • Do not use these horrible onchange and onclick attributes :( Use a dynamic action or jQuery to bind events.
    • Do not apply a style via javascript. Use CSS for this drive as with jQuery, you can easily add, remove, or toggle the classes too. And if you know jQuery selectors, you can understand css selectors because they are substantially the same.
    • I don't know why people insist on using rowIndex or substringing ID. I find it unnecessary and more complex that the alternative (crosses with jQuery)
    • The difficulty also in things into action through pagination. Running on just the visible page it of a trifle, but through paging requires more work than just check "fire on loading the page" is not enough. I'm sure you'd want your ENAME either red or gray column and readonly as soon as the page is loaded, and not when you start typing in the box...

    Form 1 tab: copied to Page 12 and made my changes here:_


    • OnChange on ENAME. This removed. No idea why you would need it there seems a crutch for not having the field in the desired state when the page is loaded.
    • OnClick on CHECKBOX. Removed what I hate these attributes. Replaced by a dynamic action.
    • Dynamic action "checkbox: ENAME readonly value."

      • Event: After refresh
      • Selection type: region
      • Region: Form of tab 1
      • No condition
      • Scope of the event: static
      • Real Action

        • Run the JavaScript Code
        • Fire on loading the Page: YES
        • Code:

          //at page load and after each region refresh:
          //each: check all checkboxes and set readonly on ename accordingly
          //click: when the checkbox changes, change ename accordingly
          $("td[headers='CHECKBOX'] input[type='checkbox']:visible")
          .each(function(){checkReadonly(this);})
          .click(function(){checkReadonly(this);});
          



  • Page > function and global variables declaration

    function checkReadonly(pCheck){
       var lCheck = $(pCheck);
       lCheck.closest("tr")
       .find("td[headers='ENAME'] input:visible").each(function(){
          $(this).prop("readonly", lCheck.prop("checked"));
       });
    };
    

  • Page > CSS Inline

    td[headers='ENAME'] input{
    background-color: red;
    }
    td[headers='ENAME'] input[readonly]{
    background-color: lightgrey;
    }
    

    CSS works so much better for this than the application of style through js...

  • Form 2 tab: copied to Page 13 and made my changes here:_


    • OnChange on ENAME. This removed. No idea why you would need this.
    • OnClick on CHECKBOX. Removed what I hate these attributes. Replaced by a dynamic action.
    • Dynamic action: identical to page 12, just modified trigger area
    • Changed input to TEXTAREA when it is required:
    • Page > function and global variables declaration

      function checkReadonly(pCheck){
         var lCheck = $(pCheck);
         lCheck.closest("tr")
         .find("td[headers='ENAME'] textarea:visible").each(function(){
            $(this).prop("readonly", lCheck.prop("checked"));
         });
      };
      

    • Page > CSS Inline

      td[headers='ENAME'] textarea{
      background-color: red;
      }
      td[headers='ENAME'] textarea[readonly]{
      background-color: lightgrey;
      }
      

    • The f_set_counter function, I changed a bit: there are 2 straps too, put a semicolon at the end of each line.
      -Change $x (node) .value $s (node, value) and $v (node)
      -changed $x (node) .innerHTML to $(node) .text)
      I know: it worked. I like this better. OCD? :/

    function f_set_counter(pThis,pLength,pMaxLength,pReset)
    {
       if (pLength>pMaxLength){
          alert('The maximum length of '+pMaxLength+' exceeded.');
          $s(pReset, $v(pReset).substring(0,pMaxLength));
          $("#"+pThis).text(pMaxLength);
       }else{
          $("#"+pThis).text(pLength);
       };
    };
    

    Published by: Tom on February 15, 2013 12:48
    Made a mistake in the case of dynamic action :->, click after refresh!

  • To access the objects in array form using javascript

    I hope, it's a simple question that I've been beating my head on the days...

    I have a form with several fields of the same name--let's call it the recordedHours of fields.

    Adobe assign an index for each instance of the field, so we will have to recordedHours [0], recordedHours [1]... recordedHours [30]

    Now, I need to set and get the values using Javascript, so something like:

    for (i = 0; i < = 30; i ++)

    {

    var h = this.recordedHours [i] .rawValue;

    }

    It does not work. Or don't complete a reference: form1.timeform.recordedHours [i] .rawValue

    or getElement: this.getElement ("recordedHours", i)

    or the dotted notation: form1.timeform ["recordedHours"].i.rawValue (syntax error, as I have, when converted to digital gives an illegal element/object identifier)

    I tried all the ways I see maybe get and set values through Javascript and I've searched high and low on the web but couldn't find anything - I know I have probably SUS (the stupid user Syndrome), but can someone help me out here?

    See you soon,.

    Marty.

    The problem is that you have to solve the expression to be able to get the right index finger, you can use the xfa.resolveNode syntax. This allows you to pass a string and that gets interpreted for you. So the syntax:

    for (i = 0; i<>

    var h = xfa.resolveNode ("form1. ("Page1.recordedHours [" + i + "']") .rawValue

    }

    Hope that helps

    Paul

  • Problem with Oracle Forms 11 g 2 on linux

    Dear all

    Here's the problem:

    • -J' installed Oracle Forms 11 GR 2 (11.1.2.2.0) on Linux from Oracle using the JDK 1.7.0_79 6.6
    • -J' solved all the problems and issues of the Arab reports.
    • -Now regarding the oracle forms now when I compile the FMAS on WINDOWS and move them to LINUX, they work very well except for forms that use WEBUTIL the form runs but WEBUTIL functions do not work
    • - So I tried to compile these forms on LINUX now WEBUTIL feature works, but all forms (with or without WEBUTIL) compiled under LINUX display this exception message before the race, here is the behavior:

    1. 1 - the form has a trigger CONNECTION on, but here's what's happening
      01.jpg
    2. 2. after pressing ok, it requires logon, and when I try to log displays the ORA-12705 as above and so on

      02.jpg
    3. 3. but after I click on cancel turns on and uses the trigger opening SESSION and works of good form

    Hope there is a solution for this.

    Best regards.

    The problem was because I was using a NLS_LANG that contains a space in the value and it is surrounded by quotes like NLS_LANG ='NLS_LANG ARABIC_SAUDI ARABIA. AR8MSWIN1256', which worked very well with reports.

    but it seems that the quotes were causing problems with forms,

    So I put NLS_LANG to the two forms and reports ARABIC_EGYPT reports.sh default.env. AR8MSWIN1256 OR ARABIC_AMERICA. AR8MSWIN1256

    both work well, now no NLS_LANG, error

    but the question of having to recompile the forms when moved to another server, who I thought he was still a known issue.

    Best regards.

  • Problems with save for web - Illustrator

    Had problems with the recording of the images for the web in Illustrator (I use AI CC 2015).  When I save it for the Web my preview image appears at the level of 50% and pixelated.  And the saved image is pixelated. Type is optimized.  When I try to export the file resolution of 72 dpi out of poor as well.  I try to save at a higher resolution and reducing the size and who doesn't either.  Any help would be appreciated.  Thank you

    Adobe has released a 19.0.1 fix that resolves this problem in discussion on this topic. Please apply the patch to your creative cloud application. The creative cloud application checks the update once a day, so you may see the update immediately.  If you want to force the check for an update at the beginning please logout and log back into the creative Cloud application.

    Link to 19.0.1 release notes: https://helpx.adobe.com/illustrator/kb/illustrator-cc-2015-crash-bug-fixes-19-0-1.html

  • Problem with fluid form is not "fluid".

    I have problems to do a fluid form in Designer ES...

    Using Windows 7, Acrobat 9 Pro Extended and life cycle of Designer ES 8.2

    I'm a noobie to the use of life cycle of Designer ES and usually only use Acrobat Pro Extended to create PDF files in other formats.

    I am trying to help a group not-for-profit with a scholarship application form. They gave me a form that was created in Word. I converted it to a form of Acrobat in Acrobat 9 Pro Extended without problem (as I know in any case). However, the problem with the Acrobat form was the answer for the questions boxes would create a scroll bar when the answers are longer that the size of the box and the text beyond the viewable area is not displayed when you print. I read the other threads in this forum and looking for tutorials to make the fluid shape using the life cycle Designer ES by checking allow several lines, expand to fit under Y:/height and economy in a dynamic form of XML.  What makes the text box expand as needed, but the text and then overlay the text below in the form. I need the entire form to expand as needed based on the length of the answers to the questions. I know that others have had this problem, but I can't seem to implement correctly based on what I read when others have reported this problem. BTW - the form contains a header with the page number on the second page that should be repeated if the shape extends to three pages, etc. and a signature block which must remain at the bottom of the form when you are finished. I was not able to make the fluid form to test or work with these other potential issues.

    I am frustrated with this problem and would appreciate your help. I downloaded a copy of the form sanitized to see if someone can take a look and see what I'm doing wrong or missing.

    http://www.box.NET/shared/9a0bf9v8l8nn97slxchh

    Thanks a lot for your help.

    Eric

    Hi Eric,.

    Here's your form to you, I did a job on page 2 for you out of the box. https://acrobat.com/#d=0Dm * XIrtAFi4Y49nwWXBWQ.

    What I would say is that you have a bit of work to do. I changed the content on the Master Page (purple dashed area) area. This should be within the area of the page, giving you a margin. This is especially important when working with past presentations.

    You will need to place all the objects that are static within a positioned subform, then objects that grow in height within a Flowed subform. So also, the page must be set flowed.

    There are some forms here you should have a good overview:

    Explorer positioned and flowed subforms: http://assure.ly/eSGQMt.

    Extend page layouts objects flowed: http://assure.ly/e2jR0C.

    Making the dynamic fields: http://assure.ly/g80MVY.

    Create dynamic tables (has screenshots): http://assure.ly/gk8Q7a.

    Hope that helps,

    Niall

  • Problem with the iPad using kindle app.

    WE have 2 iPads, iPad 3 and the air of aniPad. Nor are working using the kindle App freezes and looks like he's trying to download or open a book. Which of the two in the lower part shows also cloud and who is on the side of the unit?

    Amazon made the kindle app, not Apple.

    If you have problems with the app-contact Amazon Kindle.

    http://www.Amazon.com/GP/help/customer/display.html?nodeID=200298460

  • Some problems with Toshiba 40LV933G using the Serbian language settings

    Hello

    I have Toshiba 40LV933g TV a few months already.
    The firmware version is finally a 1.00.08.
    And I have some problems with it, which I think can be corrected in some of the new firmwares (if there is one).

    First of all, when I select Serbian language 'Move' in media player is not translated.

    Secondly when I select the Serbian country in the menu I can't automatically scan for DTV and ATV ATV just of channels.

    Third and the greatest problem is medial Player do not support these last Serbian latin in subbtitles as:? šŠ?? žŽ
    and there is no possibility of changing the size of this last subbtitle. Things like this other brands are already supported.
    * also the time between changing channels is long enough *.

    Best regards.

    I noticed the same problem with subtitle on my TV Toshi when I use the media player (movie recorded on USB key). These Latin letters are not displayed correctly.

    I also hope that this can be corrected with new firmware.

    By the way: do you know where you can download the latest version of the firmware?

  • Problem with smart updates using the WiFi, modem OK

    I started having problems with my WiFi on my Toshiba Satellite laptop.

    I can not access any program Smart Update - Windows, Norton, Spydoctor, inheritance etc..

    These Smart Update programs work very well if I'm connected to Dial-up but not wireless.

    I checked my Norton Firewall settings - doesn't seem to be an indication of a problem here.
    I disabled my firewall program - no change.
    I tried the drivers updated - no change.
    I uninstalled the other software spy/advertising programs and checked my registry - no change.

    My Internet is fine - I can always check email and browse websites - just the Smart Update function seems to be affected.

    I am running Vista and have updated and installed all the files system through my modem connection. I use Norton 360.

    Any suggestions?

    Concerning

    Lisa

    Hello

    The wireless internet connection seems to be ok if you can access the Web sites.
    So I think that the problem must be installed software or application.

    You use Norton 360?
    Although I know this software could affect the internet connection.
    See this Symantec support page:
    http://www.Symantec.com/Norton/support/selectproduct_ts.jsp

    There are some frequently asked questions about various issues with Vista, and Norton 360.

Maybe you are looking for