HTTP vs event.target.submitForm Submit button

Dear all,

I have a problem that looks like, I need expert help to the resolve.

I have designed a form with Acrobat, LiveCycle Designer ES 8.2

The plan is people to fill out the form and submit it to a script on a web page.

That is the problem.

When I insert a normal button of HTTPSubmit. This medication works very well. All fields in th are sent, and I can treat them with my script.

However, when I try to make a normal button and add javascript for the click event.

event.target.submitForm ({cURL: "http://mysite/myscript.php", cSubmitAs: "HTML", cCharSet: "utf - 8"});

The form is sent, but no fields are.

As an example of the output of the APPLICATION of table in PHP.

With the regular HTTP submit button, I get:

Table
(
[familyname] = > 1
[SubjectNumber] = > 2
[Site] = > 3
)

So that the JavaScript file above, I get:

Table
(
[form1] = > Array
(
[0] = >
)

)

It looks that the JavaScript file I somehow can not present the actuall fields.

Finally, let me tell you the reason why I still want to use Javascript instead of the regular HTTP Submit button.

My plan is so people can actually change the location where to send the form.

From what I've read if I use a single submit button, the URL must be hard-coded and cannot be changed (selected by the user dynamically)

Whereas if I use javascript so I can easily have a text field where people can enter the site where they want to submit the form and use it.

Thank you very much for your help

Please let me know if you need additional information

Concerning

Tsvyatko

Actually I think you can set the url of a "submit" button.  Try using the following FormCalc code:

submitbuttonname.event__click. #submit. #target

= the string entered by the user

The string entered by the user must include "http://" in the front, e.g. http://www.google.com

As long as the code above is executed before pressing the button submit, you should be OK.  I have not worked on the JavaScript syntax.

Tags: Adobe LiveCycle

Similar Questions

  • An another Email Submit Button application assistance

    I have read the many buttons send e-mail and try many posted suggestions, including excellent sample files srechaussaient several methods to accomplish and not had total success with any method quite yet, I'm sure due to my lack of knowledge in this area, not because good examples and instructions.  The sample I found here, http://forums.adobe.com/message/2522202#2522202, is the closest to what I need with 2 exceptions.

    1. need to form in PDF, not XML.

    2 need to object to include a company name field

    Otherwise, it seems to do everything I need.  If I do a required field in the sample, it won't let me submit until I have completed the necessary.  She holds the topic, e-mail text, etc. during the conversion to adobe reader extended form, and if it can be modified to send in PDF format and include the company name for the field form on the subject it would be so fantastic.

    The JavaScript code in the sample is below.  I would be very happy for any help in this last hurdle in my form, thank you.

    
    form1.page1.emailButton::click - (JavaScript, client)
    
    // First give a messageBox with instructions
    xfa.host.messageBox("This will open your email client and prepare an email for you. " 
    + "Please make sure you send the email to complete the process." 
    
    +
    "\n\nIf you experience any difficulties or if you are using a " 
    +
    "web based email client, then please save this form and " 
    +
    "manually email it to [email protected]\n\nThank you!"
    , "Email Instructions", 3, 0);xfa.host.beep("3");
    
    // then pass instructions through to email client
    var
    
     vEmail = "[email protected]"; 
    var
    
     vSubject = "A9100 - Example of Email Button Script"
    var
    
     vBody = "Hi\n\nPlease find attached the completed form in xml format.\n\nRegards,\n\nNiall" event.target.submitForm({cURL
    
    :"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody,cSubmitAs:"XML",cCharset:"utf-8"});
    

    Simply change the parameter of cSubmitAs in PDF instead of XML

    To get the name of the company on the subject you can do when you set the variable. Assuming that the name of the company is in a field called companyName:

    vSubject =

    "A9100 - Sample Script in the button send and added the company name:"+ CompanyName.rawValue ".

    The part in quotation marks will come off as you typed them and the value of the companyName field will be added at the end of the string.

    Paul

  • Submit button not working not properly

    I use below successfully for years on a form and have recently extracted one a short version of the page of the form and remove 6 pages.  The send e-mail button does more work on the version of a page (though still works fine on the other version).  Checked to make sure no fields that are used in the code for the Send button have been removed, they are all still in-tact in the version of a page.  When I distribute and test, it will get instructions, but when I click on ok put it to the top of the email, it sounds right and nothing happens.  It seems to only use 3 fields - the SubjectDate, which is a date field (FormCalc setting = $.rawValue = field Num2Date (date (), "YYYY")), Company_Name and Contact, who are still on the form.  Any ideas what I missed or accidentally deleted when the version of a page?  Thank you.

    // First give a messageBox with instructions
    xfa.host.messageBox("This will open your email client and prepare an email for you. " + 
                            "Please make sure you send the email to complete the process." +
                            "\n\nIf you experience any difficulties or if you are using a " +
                            "web based email client, then please save this form and " +
                            "manually email it to [email protected]\n\nThank you!", "Email Instructions", 3, 0);
    xfa.host.beep("3");
    
    // then pass instructions through to email client
    
    var vEmail = "[email protected]";
    var vSubject = SubjectDate.rawValue + " Procurement Info: " + Company_Name.rawValue
    var vBody = "Hi\n\nPlease find our attached completed Procurement Info form.\n\nRegards,\n\n" + Contact.rawValue 
    var obj = event.target;
    
    event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody,cSubmitAs:"PDF",cCharset:"utf-8"});obj.close();
    

    Hello

    While the three objects may still form, the relative reference of the key to all things may be different. For example, all three references are on the grounds that the three objects are in the same container as the button.

    Check that the references are correct. See a discussion and an example here: http://assure.ly/kUP02y.

    Hope that helps,

    Niall

  • Adding CC to 'Submit' button custom

    With a lot of help here in the past (thank you!), we used a form with a custom submit button, and I need to add a cc.  I have add a var [email protected]= VCC, but not luck by correctly placing in this event.  What is the right way to add an extra cc?  Thank you!

      
    event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody,cSubmitAs:"PDF",cCharset:"utf-8"});obj.close();
    

    event.target.submitForm ({cURL

    : "mailto:" + vEmail + '? ' "" "subject =" + vSubject + "& body =' + vBody + '& cc =' + vCC, cSubmitAs: 'PDF', cCharset:"

    "utf-8"});

  • Title of TextField to fill in the subject line of a submit button

    I need for the textfield title to assign automatically in the subject line of the Send button

    What is the code goes into sub =?

    var overtime

    void =

    ebody var

    Thank you

    Its probably too easy to use a normal button with the following

    var sSubject = CTitle.rawValue;
    
    var sBody = ;
    
    event.target.submitForm({
        cURL: "mailto: [email protected];[email protected],[email protected];&subject=" + sSubject + "&body=" + sBody,
        bEmpty: true,
        cSubmitAs: "PDF",
        cCharset: "utf-8"
    });
    

    use? for the first parameter and & for each subsequent in mailto

  • run event.target from a page 1 button to run on page 4 of the form

    Hello

    I currently have a button on page four of the form which takes place this javascript.

    If (event.target.value! = 'Off') {}

    this.getField("strike5").display = display.visible;

    } else {}

    this.getField("strike5").display = display.hidden;

    }

    If (event.target.value! = 'Off') {}

    this.getField("strike6").display = display.visible;

    } else {}

    this.getField("strike6").display = display.hidden;

    }

    //

    If (event.target.value! = 'Off') {}

    this.getField("strike7").display = display.hidden;

    } else {}

    this.getField("strike7").display = display.visible;

    }

    If (event.target.value! = 'Off') {}

    this.getField("strike8").display = display.hidden;

    } else {}

    this.getField("strike8").display = display.visible;

    }

    I wish now to turn by a button on page 0 to do the same on page four.

    Is this possible?

    I hope so... See you soon

    I would create a document-level function to adjust the display of the fields when the box of cehck is not equal to 'Off '.

    function SetStrikeDisplay (cValue)
    {
    Set the fields to display when the value is 'Off' to the default value;
    this.getField("strike5").display = display.hidden;
    this.getField("strike6").display = display.hidden;
    this.getField("strike7").display = display.visible;
    this.getField("strike8").display = display.visible;
    If (cValue! = "Off")
    {
    this.getField("strike5").display = display.visible;
    this.getField("strike6").display = display.visible;
    this.getField("strike7").display = display.hidden;
    this.getField("strike8").display = display.hidden;
    }
    return;
    } / / end of function SetStrikeDisplay;

    For each field, you want this script to run to use the following code:

    SetStrikeDisplay (event.target.value);

  • I want a submit button which first clicked once lock fields and if the button is clicked again then it ask password unlock all fields

    Sir / Madam,.

    I want to do a mailing that affects when you click on would lock all fields so that no change is possible... and if user clicks on the button submit then again he should ask password to unlock all the fields for editing... and again user can edit the required fields.

    Hope you got what I'm trying to say.

    I guess you don't know what an anonymous JavaScript function, and this is why you set one inside the "if" statement Such an anonymous function allows you to create a private field of the variables, which would otherwise eventually be global. If you want to use this mechanism, you can shoot on the definition of function to the next level. In addition, your code defined the fields of writing, regardless of the entered password. I moved a few small things around, and it works for me:

    (function() {
        var isReadOnly = this.getField("Text4").readonly;
        if (isReadOnly) {
            // Get one of the fields in the group
            var f = getField("Text4");
    
            // Determine new readonly state, which
            // is the opposite of the current state
            var readonly = !f.readonly;
    
            var readonly_desc = readonly ? "deactivate" : "activate";
    
            // Ask user for password
            var resp = app.response({
                cQuestion: "To " + readonly_desc + " the fields, enter the password:",
                cTitle: "Enter password",
                bPassword: true,
                cLabel: "Password"
            });
    
            switch (resp) {
                case "123": // Your password goes here
                    for (var i = 0; i < this.numFields; i++) {
                        var fieldName = this.getNthFieldName(i);
                        if (fieldName != event.target.name) {
                            this.getField(fieldName).readonly = false;
                        }
                    }
                    app.alert("The fields are now " + readonly_desc + "d.", 3);
                    break;
    
                case null: // User pressed Cancel button
                    break;
    
                default: // Incorrect password
                    app.alert("Incorrect password.", 1);
                    break;
            }
        } else {
            for (var i = 0; i < this.numFields; i++) {
                var fieldName = this.getNthFieldName(i);
                if (fieldName != event.target.name) {
                    this.getField(fieldName).readonly = true;
                }
            }
        }
    
    })();
    
  • OPA hangs on hitting the "submit" button

    Hello
    We deployed the OPA application in tomcat. We have also integrated with siebel. Now, when we open the OPA application, fill in the data and press the "submit" button then the OPA crashes. Below is the error we have obtained from the logs:

    com.oracle.determinations.interview.engine.exceptions.InterviewEngineException: error while trying to restore the transaction (s)!
    at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.rollback(RuleSessionManager.java:644)
    at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.setData(RuleSessionManager.java:84)
    at com.oracle.determinations.interview.engine.local.LocalInterviewSession.submit(LocalInterviewSession.java:311)
    at com.oracle.determinations.web.platform.controller.ScreenController.submitScreenAndCollectGoal(ScreenController.java:377)
    at com.oracle.determinations.web.platform.controller.actions.InvestigateAction.submit(InvestigateAction.java:84)
    at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doPost(WebDeterminationsServlet.java:102)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
    at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
    to com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$ SSLReadCompletedCallback.complete (SSLReadServiceContext.java:1772)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    to com.ibm.io.async.ResultHandler$ 2.run(ResultHandler.java:905)
    to com.ibm.ws.util.ThreadPool$ Worker.run (ThreadPool.java:1550)

    Is the buggy to OPA or we do something wrong?

    This section of the documentation ("create a custom user experience interview") describes the approach suggested for dealing with data submitted by a custom application, not Web determinations at the interview session.

    Only one track of the battery is sparing of information, given that this situation can be caused by something that modifies the data during the interview, including incorrect data from Siebel, custom functions or inference event listeners.

    Please request a service with Oracle Support, providing the following:
    1. the modules, or a replica appropriate modules that will reproduce the problem
    2. the details of custom functions or events of inference that can be used at the interview
    3. the measures necessary to recreate this issue - including what data have been stored in the session of Siebel, and what data have been added on each screen in the interview process before the Submit that caused this error.
    4. the version of the OPA OPA Siebel connector you use

  • Pages.gotoAndStop (event.target.name);

    I followed this tutorial

    http://www.YouTube.com/watch?v=AhsSQGcm46E

    I make a Web site with buttons but when I test the scene it scrolls and loops of each content page.

    This is the code I have for action script


    var myMenuArray = [which, video, photography, Web design];
    for each {(var btn in myMenuArray)

    btn.addEventListener (MouseEvent.CLICK, onBtnClick);

    }
    function onBtnClick(event:MouseEvent):void {}


    Pages.gotoAndStop (event.target.name);
    }

    When I test the scene, he said.

    1061: call to a Stop method maybe not defined through a reference with static type fl.motion:AnimatorFactory.

    Any ideas?

    The error would give the impression that Pages is not an object with a timeline

  • Submit button not enabled, while the fields are white

    Hi all

    I've seen this done before, just don't remember where...

    I have two input fields, a user name and password and a submit button.

    I want the button submit to be disabled while one or two input fields have no text in them.

    Any that offered little help?

    Hello

    It's about as simple as possible, I think that...

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >

    Import mx.events.FlexEvent;

    Import spark.events.TextOperationEvent;

    protected function textinput1_changeHandler(event:TextOperationEvent):void

    {

    If (pass.text.length > 0 & user.text.length > 0) btn.enabled = true to another btn.enabled = false;

    }

    ]]>

  • Double click with Submit button

    A submitButton on the page automatically manage / block the action of double-tap of the user?

    I have an application when a button "submit" cause transformation & agrees to occur.
    I want to assure you that when the user "double-click on ' button, it does not cause problems.

    Thank you

    Hello

    A submitButton on the page automatically manage / block the action of double-tap of the user?

    No, it does so...

    You can write the code below in the processRequest method of your controller to disable the button until the treatment of the moment happens after complete transformation you can still click "submit" button.

    OAWebBean body = pageContext.getRootWebBean();
    if(body instanceof OABodyBean)
    {
    ((OABodyBean)body).setBlockOnEverySubmit(true);
    }
    

    Please refer to this article for more details
    http://mukx.blogspot.com/2009/12/blocking-user-on-submit-action-in-OAF.html

    In addition, if you want to disable the button after the first click, then click on get a redirect to the event he same page and make this option off or to do use partial-page rendering.

    Thank you
    AJ

  • event.target.buttonImportIcon ();

    First of all, let me say that I know just enough to be dangerous... so please be nice.

    FYI - I have Acrobat, full paid, more up-to-date version.

    I created a form and in this form, I have several boxes for the insertion of photos. I use the script event.target.buttonImportIcon (); to insert pictures. I am aware that in the free version, only the PDF files may be inserted. However, I have the full version. When the box opens for me to find the picture to be inserted, it takes by default showing only PDF files. I can change it to jpg and browse, but it is heavy, because every time I have to complete this form, I need to send pictures of 12-18 for documentation.

    My question is, is there a way so that the box which opens all to display jpg files? Or at least to show all file extensions? I know that this is not a huge deal, but I do 3 to 5 of these forms per day, with pictures of 12-18 each, so it would be nice not to change the file type, I'm looking at every time.

    Thanks a lot for your help!

    Someone asked more information, so here's a more complete script which can be placed in a folder level JavaScript file:

    var ASGJ_buttonImportIconAll = app.trustedFunction(function (doc, f_name) {
    
        // Get a reference to the specified field
        var f = doc.getField(f_name);
    
        // If the specified field does not exist...
        if (!f) {
    
            app.beginPriv();
            app.alert({
                cMsg: "The specified field [" + f_name + "] does not exist.",
                nIcon: 0,  // Error icon
                nType: 0,  // OK
                cTitle: "Field does not exist"
            });
            app.endPriv();
    
            return;
        }
    
        // If the specified field is not a button...
        if (f.type !== "button") {
    
            app.beginPriv();
            app.alert({
                cMsg: "The specified field [" + f_name + "] is not a button.\r\rField type: " + f.type + "\r\rCannot import icon.",
                nIcon: 0,  // Error icon
                nType: 0,  // OK
                cTitle: "Field is not a button"
            });
            app.endPriv();
    
            return;
        }
    
        // If the button layout is label only...
        if (f.buttonPosition === position.textOnly) {
    
            app.beginPriv();
            app.alert({
                cMsg: "The specified button [" + f_name + "] has a Text-only layout.\r\rCannot import icon.",
                nIcon: 0,  // Error icon
                nType: 0,  // OK
                cTitle: "Button layout is text-only"
            });
            app.endPriv();
    
            return;
        }
    
        // Prompt user to select a file to use as the source for the button icon
        app.beginPriv();
        var oFilespec = app.browseForDoc({
            cFileFilter: 2,
            cWindowTitle: "Select an image"
        });
        app.endPriv();
    
        // Deal with the selected file
        if (typeof oFilespec !== "undefined") {
    
            // Attempt to use the selected file as the source of the button icon
            app.beginPriv();
            var nReturn = f.buttonImportIcon({
                cPath: oFilespec.cPath
            });
            app.endPriv();
    
            switch (nReturn) {
            case -1 :
                app.beginPriv();
                app.alert({
                    cMsg: "The selected file: " + oFilespec.cPath + "\r\rcould not be opened." ,
                    nIcon: 0,  // Error icon
                    nType: 0,  // OK
                    cTitle: "Cannot open selected file"
                });
                app.endPriv();
                break;
            case -2 :
                app.beginPriv();
                app.alert({
                    cMsg: "The selected page is invalid.\r\rCannot import icon.",
                    nIcon: 0,  // Error icon
                    nType: 0,  // OK
                    cTitle: "Selected page invalid"
                });
                app.endPriv();
                break;
            default :
                // Import was successful or user canceled
                // so there's nothing to do
            }
    
        }
    
    });
    

    The function can be called like that in the mouse event to the top of a button:

    ASGJ_buttonImportIconAll(this, event.target.name);
    
  • Drag-and - drop 'submit' button and hand - 9 Captivate slider

    Unlike normal questionnaires 'submit' buttons, the Captivate 9 Drag & Drop 'submit' button does not appear able to show the hand cursor to the passage of the mouse.

    Importing a project of Captivate 8 to 9, it sometimes works, sometimes doesn't work, so I can't find a way to make it work on naked new projects created with Captivate 9.

    The Drag & Drop option "Use hand cursor" is clearly displayed, although affecting only the sources and targets but not the button 'send '.

    Captivate 9 runs on Windows 7.

    Thanks for the help,

    Matteo

    Moderator: I took your personal address, this is a public forum

    I'm sorry, but the button submit in D & D seems to have the ability to display the hand cursor. It uses the same style buttons embedded on the Quiz slides, but the hand cursor doesn't do not part of the style. I've often done drag the button to send off the stage and just set hotkey (as input).  I also checked in Captivate 8 but he has never had the option to display a hand cursor to the button send D & d, so I'm surprised when you write "when you import a project of Captivate 8 to 9, it works sometimes"

  • Adobe Submit Button - add a CC field?

    I have a form that will be used by several people within the company. I have the submit button designed for mailto: a specific e-mail. Is there a way I can bind the fields in the form (e.g., employee name) to the mailto: function to automatically add in their emails?

    For example, if I have an employee field and a field Manager, I would like these people CC'd on the button submit; However, these email addresses will change between Forms.

    Is there a script I could write in each field name that relate to the submit button?

    Thank you!

    See: https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

  • Submit button issues

    I have various problems with my button "submit" on Acrobat XI using a PC.  I'm trying to publish it on a Web site.  Users can fill in with Chrome, but can't submit - button not responding.  Users must download the form, if you use Firefox.  They can fill it out on this browser.  Also, I put the action to submit to be on the mouse at the entrance.  The continuous form "submit" every time that my mouse scrolls above the button.  Am I missing something?  I'm kinda new to active forms.  Thank you!!

    You must use the event mouse up, not mouse enter.

    You have configured submit button to send to a web server or if you use a type mailto URL?

Maybe you are looking for

  • I need the century Gothic fonts for my windows XP

    Does anyone have the files of fonts for Windows XP "century gothic"? I need to reinstall my computer for a specific program work. (treated receipts)

  • SD205 (switch) and VLAN

    In addition to all my switches Cisco Catalyst (successful), I have a bunch of Linksys SD205 unmanaged switches on my local network. I want to configure my network for VLANs, which means I have all my managed Cisco switches will change to a "Routing"

  • 800b0100 error... KB2690533 impossible to update, vista 32-bit

    Ive done... fine analysis tool I've done the direct link for the download... not good... told me "the update does not apply to your system" I've done the fixit of m... not well... tells me ' locations by default windows update of data have changed «.

  • HP G61-430SB: replacement of battery HP G61-430SB

    I would replace the battery of my HP G61-430SB. Is it still available? If Yes, where can I buy it?

  • Windows 7 update for HP Quickplay

    I just updated my "HP Pavilion dv6871us" Windows vista to windows 7, and I experienced some problems with the HP Quickplay. It takes forever to load and then it does not work properly. I thought all I had to do was update the driver but I can't find