Saving a form on click of a button.

Hi,
I need the script to save the form on click of button.I've tried to use "app.execMenuItem("Save");".But it is not working.
Is there any equvalent for this command in livecycle forms?
Please Help..

Unfortunately there is no equivalent and the operation you are trying to do is unsafe. From the javascript reference
(Acrobat 8.0) The execution of menu items through execMenuItem method is restricted to a short list of safe menus. The execMenuItem method will silently fail if a named menu item is executed that is not on the safe menu list. Menu items may be removed in future releases, or their behavior may change.
Save is an item on that list. The only way to get it to work is to run it under a privileged context (batch/console/trusted function in js folder)

Similar Messages

  • Loading and displaying other  form on click of a button using swing

    hi,
    i've just started with my first ever swing program. i want to load another UI form on click of a button . how can i do that.

    Sorry for posting last message
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class MainCl extends JFrame
    public MainCl()
    this.setBounds(100,100,400,300);
    btn = new JButton("Click me to show another fframe");
    btn.setBounds(10, 20, 250, 30);
    this.getContentPane().setLauout(null)
    this.getContentPane().add(btn);
    btn..addActionListener(new ActionListener()
    JFrame frm2 = new SecondFrame();
    frm2.setVisible(true);
    public static void main(String [] args)
    JFrame frm1 = new MainCl();
    frm1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frm1.setVisible(true);
    JButton btn;
    class SecondFrame extends JFrame
    public SecondFrame()
    this.setBounds(200,200,200,100)
    this.getContentPane().add(new JLabel("This is NEW FORM"));
    }

  • How to call a custom form on click of a button?

    We have a requirement to call a custom form on clicking a button which is on a standard form. I cant modify the standard form. Is this possible to handle this event from CUSTOM.pll or forms personalization?
    some sample code will help. Thanks in Advance,
    Message was edited by: 988490e8-2268-414d-b867-9d9a911c0053

    Hi,
    I think you are working with Oracle EBS.
    I don't think so that we can able to call the custom form on clicking button.
    We can call the form from the standard form using both custom.pll and form personalization
    In custom.pll using zoom function we can do this and in form personalization we can call the form by using form function, In both we call the form by creating a special menu in standard from and we used to call.
    So please check further, and let me know if any i can help you any.
    Regards
    Sri     .

  • Savin a Form on click of a button.

    Hi All,
    I have created an Adobe Form using Adobe Designer 7.0. I want to save the filled up form using a button on the Form itself, instead of going via the File->Save As option.
    Is there a way of eleminating the File->Save As method, and instead have a button on the form(maybe using the JavaScript Editor) or any other way by which this can be done.
    Any help in this regard would be highly appreciated.
    Thanks and Regards,
    Sameer.

    I did a quick test. You don't need a certified PDF, but as Aandi suggested you do need a trusted function to do this. What you need to do is place the trusted function to save the document in a .js file and then place that .js in the \Acrobat\javascript folder on the client machines that you want to be using this form. Once that's done your form can call the trusted function and save the PDF to your specified location without prompting the user.
    See the Acrobat Javascript reference for more information on trustedFunction, but here's the script I used to test this:
    saveFunc = app.trustedFunction(function () {
    app.beginPriv();
    try {
    event.target.saveAs("/c/test/testSaveAs.pdf");
    } catch (err) {
    app.alert("Error: " + err);
    app.endPriv();
    I then called saveFunc() from the click event of my button.
    H.

  • How to open a form on click of a button in infopath

    I have created an infopath form on a list. I need to create a button on the pape on click of which the last item created by the user should open. I mean the edit form of that list item should open. 
    How can we do this ?
    Thanks for your response in adv.
    Regards,
    prajK

    Hi,
    Per my understanding, you might want to add a button on a page, when clicking it, the last form which is created by the current user will open.
    As it might require to query the last form created by current user, custom code would be required.
    A solution is that, you can query the URL of the last form created by the current user using JavaScript Client Object Model, generate a button with the URL retrieved
    using JavaScript. Then when user open this page, the button will be created dynamically, user clicks it, the last form created by this user will open.
    More information about JavaScript Client Object Model:
    How to: Create, Update, and Delete List Items Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx  
    Common Programming Tasks in the JavaScript Object Model
    http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx
    About how to create a button using JavaScript:
    http://stackoverflow.com/questions/7707074/creating-dynamic-button-with-click-event-in-javascript
    Thanks 
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Calling a smart form on click of a button in web dynpro abap

    Hi experts,
    I have a requirement like if I click a button in a view i need ti generate a PDF through smart form.
    Is this possible. If so please tell me the way..
    Thanks & Regards

    Hi Sharma,
    Create Interactive form in your view, create one node say PDF_SOURCE under this one attribute PDF_SOURCE of type XSTRING.
    Bind this to IF form Datasource and pdfsource.
    in your button action write code to call your smartform
    using SSF_FUNCTION_MODULE_NAME
    using FM  CONVERT_OTF and attach_file_to_response
    *convert to pdf
      call function 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = lv_bytecount
        TABLES
          otf                   = ls_job_output_info-otfdata
          lines                 = lt_lines
        EXCEPTIONS
          err_conv_not_possible = 1
          err_bad_otf           = 2.
      loop at lt_lines into ls_line.
        lv_string = ls_line.
        export mydata = lv_string to data buffer lv_buffer.
        import mydata to l_xline from data buffer lv_buffer in char-to-hex
        mode.
        concatenate l_pdfstring l_xline into l_pdfstring in byte mode.
      endloop.
      call method cl_wd_runtime_services=>attach_file_to_response
        EXPORTING
          i_filename      = 'ZWTY_PACKINGSLIP'
          i_content       = l_pdfstring
          i_mime_type     = 'BIN'
          i_in_new_window = abap_false
          i_inplace       = abap_false.
    also check this..
    http://abapcodexperiments.wordpress.com/2011/03/20/smartform-pdf-webdynpro-abap/
    Call smartform in web dynpro abap
    Cheers,
    Kris.

  • Close form after click on send button

    Hello,
    I would like the adobe form to close after the user clicked on "send by email" button.
    I found this code to do it automatically :
    app.execMenuItem("Save");
    app.execMenuItem("Close");
    But I don't see where I can write it as I can't modify the click event.
    Any idea ?
    Thanks in advance

    I don't know if this will work, but what if you have another button that triggers the submit event and the code to close the form later on? Hide the actual submit button from your layout.
    "Normal Button" code:
    SubmitButton.execEvent("click");
    app.execMenuItem("Save");
    app.execMenuItem("Close");
    Cheers,

  • Hi, I would like to know how can I recover a document from pages that I didn't save anytime and instead of clicking the button save I clicked the delete button at the end. Is there any way to recover it?

    Hi, I would like to know how can I recover a document from pages that I didn't save anytime and instead of saving the doc I clicked the delete button. Is there any way to recover it?

    Regardless of application, the first step that I take is to save and name the current document — even if it has no content yet. With Pages, this good habit enables autosave. As you add content, your document revision history is restorable via the File Revert To menu. The delete key has the same document foreboding as only teaching a pet raven to speak "Nevermore."

  • Sending a email with the form attached but no submit Button

    Hi experts,
    I have designed a form in ABAP using the t-code SFP. i Have a button "accept", in the form.
    Now i am calling this form from an executable program and send it to mail with the form attached.
    I am successfully receiving the mail with the form attach.
    Now my requirement is when i open the attached form and click on ACCEPT button, again a mial shud be triggered with the same form attached but no ACCEPT button shud appear on the form.
    I am able to trigger the mail on click of the ACCEPT button and mail is also sent withj the form attached , but the ACCEPT button still exists.
    I have written the following code on click of the button.
    this.presence = "invisible";
    event.target.submitForm();
    Please some expert help me in solving this problem as soon as possible.
    Thanks and Regards,
    Madhu

    Did you get my point hwta i have mentioned? The steps which I have suggested will solve your problem.
    Please add one dummy attribute (One Char length) to the Form interface.
    In the form add one hidden field - SubmitFlag and bind this to the dummy attribute of the interface. Before submit set this flag to Y.
    On form Load check if Submit Flag is Y or not. if it is then hide the button agin.
    This will work fine for you.
    If after implementing this it will not work, send it to my Id [email protected]
    But first i will suggest to try yourself.
    Cheers
    Satya

  • Creation of UI elements on click of a button in ADOBE form

    Hello Experts,
    I have a requirement which is ,
    on the ADOBE form after pressing some action Button i need to create a row of UI elements like Textbox label and Radio button with the values coming from Backend WDA application.
    Number of rows created are equivalent to number of  times button is clicked.
    Also in some cases i have to preload the rows with the existing data.
    Please let me know if this requirement can be accomplished in ADOBE form.
    Any inputs ,Suggestion and help will be very helpful.
    Thanks,
    Siddharth

    Thanks for the help,
    I resolved this by creating elemnts in WD context on click of a button in ADOBE form,And in form i used the WD context structure as a table with required cell editors.
    PDF form should be of type dynamic in this case.

  • Page Number Disappesrs when click on Reset button in Dynamic Form

    Dear all,
    In dynamic forms I have taken Page n of m field outside the content area in master pages.I have added the reset button in body pages of the form.In the pdf When I click on Reset button the page nos are disappearing along with the other data.
    I want the page no should not disappear.How can I get rid of this problem. If any body can please help me.
    Thanks a bunch in advance
    Regards
    Rakesh

    Firefox checks on the server if the file has been modified if you use the back button.<br />
    If the page was requested by sending post data to the server then Firefox sends that post data and asks for confirmation.<br />
    You can try to use the tab history of the Back button skip sites that require sending post data.
    You can also try if it works if you set to never check the server by setting the browser.cache.check_doc_frequency pref to 2.
    *http://kb.mozillazine.org/browser.cache.check_doc_frequency

  • Standard backend service data vanishes on click of a button in HCM Forms

    Hi,
    I have a form which displays data from standard backend service SAP_PA and also from custom generic service.
    When I click on a button in the form, the data from SAP_PA is disappearing.
    Error message 'Please enter Personnel Number' is displaying.
    Please help me to resolve the issue.

    Hi Aravind,
    Thanks for your reply...
    Data is from standard backend service which is independent of user events..
    Data is displaying for the first time when form is dispalyed on the portal but when user clicks on any button, data is disappearing...
    Can you tell us the patch level of the system required for ESS MSS ??
    As of now our system patch level is 11,,
    This might be a  problem for data vanishing?

  • Adobe reader opens "save as" box when clicking on save button rather than saving in the same file

    Hi everybody,
    I have a fillable PDF form designed in Livecycle designer and it is reader extended. When I fill that form on MAC it let me fill and save the form as many times as I like. Everytime I make any change I just click the save button it saves changes in the same form. BUT is is behaving differently on Windows. After filling the form out when I click on save button it opens up "Save as " dialogue box to save a new copy with those changes. I have Adobe reader XI and Adobe Acrobat XI installed on windows. I know I can do that with Acrobat but I want that in reader for users who dont have acrobat.
    Please help me.....
    Thanks

    What are you filling out the form with on the MAC?

  • I click on a button to bring up a PDF form to print, button doesn't work and I get "javascript history.go(0).

    I just this week started to use Firefox 4.0 Beta 12. Our golf organization has a website that has tournament entry forms in the PDF format. You click on a button and get the form ready to print.
    When I click on the button, I don't get the form and the following message shows up-"Javascript history.go(0)

    Hi Idreier,
    I'd try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit.
    Hopefully this helps!

  • Opening a new form by clicking a button...

    How is it possible to open a new form by clicking a button in a form? I have tried following methods:
    htp.formOpen(owa_util ...
    go('<URL>'),
    call('<URL>'),
    portal30.www_user_utilities.get_url ...
    portal30.wwa_app_module.link ...

    Kaj,
    Add following code in the '... before displaying the form.' event on the 'Additional PL/SQL Code' tab.
    htp.p('<script language="JavaScript1.3">
    < !--
    function runForm()
    window.open("http://www.yahoo.com");
    //-->
    </script>');
    Add a call to this function in the 'onClick' event from the 'JavaScript Event Handlers' for the button.
    runForm();
    Hope this helps...
    Nancy.

Maybe you are looking for