Submitting Web Form via Ajax Tutorial

Any suggestions why following this tutorial: http://kb.worldsecuresystems.com/851/cpsid_85119.html?bc-partner results in the form submitting, but then loading up a white page with the following text?
{"FormProcessV2Response": { "success": true, "entityId": "51918536", "objectTypeId": "Cases", "objectId": "7634958", "message": "<table class=\"tabledefault\"><tr><td id=\"title\"><strong>Summary of web form submission:<\/strong><br\/><!-- IP Address: 24.8.110.183 --><\/td><\/tr><tr><td id=\"name\"><strong>Your Name<\/strong><br\/>Brian <\/td><\/tr><tr><td id=\"email\"><strong>Email Address<\/strong><br\/><a href=\"mailto:[email protected]\">[email protected]<\/a><\/td><\/tr><tr><td id=\"casenumber\"><strong>Case Number<\/strong><br\/>7634958<\/td><\/tr><tr><td id=\"customfields\"><table class=\"tabledefault\"><tr><td id=\"CAT_Custom_409420\"><strong>Lesson<\/strong><br \/>Model Lesson<\/td><\/tr><tr><td id=\"CAT_Custom_409419\"><strong>Quiz Score Field<\/strong><br \/>90<\/td><\/tr><\/table><\/td><\/tr><\/table>" }}
Success message is supposed to show on same page as form.
Thx,
Brian

Hi,
I managed to get this to work.....by modifying the code I found herr: User manual
Below is my entire code....hope this helps!
Kane
   <div id="message"></div>
<form name="catwebformform57649" method="post" onsubmit="return checkWholeForm57649(this)" enctype="multipart/form-data" action="/FormProcessv2.aspx?WebFormID=10090&OID={module_oid}&OTYPE={module_otype}&EID={mo dule_eid}&CID={module_cid}&JSON=1" role="form" id="contact_form">
          <div class="col-sm-4">
            <div class="form-group">
              <label for="name">Name</label>
              <input type="text" class="form-control" name="FullName" id="FullName" placeholder="Enter name"  title="Please enter your name (at least 2 characters)"/>
            </div>
            <div class="form-group">
              <label for="email">Email</label>
              <input type="email" class="form-control" name="EmailAddress" id="EmailAddress" placeholder="Enter email" title="Please enter a valid email address"/>
            </div>
            <div class="form-group">
              <label for="phone">Phone</label>
              <input  class="form-control required digits" type="tel" name="CellPhone" id="CellPhone" size="30" value="" placeholder="Enter contact number" title="Please enter a valid phone number (at least 10 characters)">
            </div>
          </div>
          <div class="col-sm-4">
            <div class="form-group">
              <label for="comments">Comments</label>
              <textarea name="CAT_Custom_869" id="CAT_Custom_869" class="form-control" cols="3" rows="5" placeholder="Enter your message…" title="Please enter your message (at least 10 characters)"></textarea>
              <br>
              <br>
              <button name="submit" type="submit" class="btn btn-lg" id="submit"> Submit</button>
            </div>
          </div>
         <script type="text/javascript">
function jqsub() {
var $f = $('#contact_form');
var $m = $('#message');
$.ajax({
  type: 'POST',
  url: $f.attr('action') + '&JSON=1',
  data: $f.serialize(),
    success: function(msg) {
    var formResponse = eval(msg); // This line evaluates the JSON data and converts it to JSON object. In older version of jQuery you will have to evaluate JSON object as a string.
        if (formResponse.FormProcessV2Response.success) {
                $m.addClass('success').fadeIn().html('<h3>Thanks for getting in touch. We will get back to you as soon as we can.</h3>');
                $f.fadeOut(); //Hide the form
    error: function(msg) {
    alert('error'+msg);
    return false;
</script>
           <script type="text/javascript" src="http://dla.com.sg/CatalystScripts/ValidationFunctions.js"></script><script type="text/javascript">
//<![CDATA[
var submitcount57649 = 0;function checkWholeForm57649(theForm){var why = "";if (theForm.FirstName) why += isEmpty(theForm.FullName.value, "Name"); if (theForm.LastName) why += isEmpty(theForm.LastName.value, "Last Name"); if (theForm.EmailAddress) why += checkEmail(theForm.EmailAddress.value); if (theForm.CellPhone) why += isEmpty(theForm.CellPhone.value, "Phone Number"); if(why != ""){alert(why);return false;}if(submitcount57649 == 0){submitcount57649++;jqsub();return false;}else{alert("Form submission is in progress.");return false;}}
//]]>
</script>
        </form>

Similar Messages

  • Business Catalyst Log in form via AJAX

    Hi guys I am trying to avoid the standard form redirection of Business Catalyst to a more customisable style but I cant get it to respond properly.
    Here is my code:
    $("#login-form").submit(function(e) {
            e.preventDefault();
            $.ajax({
                type: "POST",
                url: $(this).attr("action"),
                data: $(this).serialize(),
                success: function(e) {
                    window.location = 'https://bestkilts.worldsecuresystems.com/user-system/order-history.htm'; // I know this can be set from the form submission but I have other plans
                error: function(e) {
                    $(".form-error").slideDown();
                    $(".form-error").delay(8e3).slideUp(300)
    The form is already submitting via AJAX! "&JSON=1".
    Eventually the error message responds as a success! so I cant really look at the AJAX response to code this precise.
    Please any one there with some knowledge about it please share.

    Only custom web forms in BC have an ajax / json response request, that will not work with the login form and some others in BC.
    You will need to do your own ajax request but then you will not issues about the cross domain etc. You need to look at how the BC login works, your refresh and how to address that. (Its more complicated then you think)

  • Creating a link to specific view in a submitted InfoPath form via C#

     
    Hello,
    I have an InfoPath form that is submitted by a user, then the c# executes logic on a button click which is to send approver a link to a approver view within the submitted form(my company is
    not allowing use of Work flows).
    I have a problem creating this link namely because SharePoint changes the patter of a string that is used in creating a form name(Username and now() function characters change
    in URL).
    Is there an easy way to reference an url to a view in Infopath form via C#
    Thank you.
    Nemanja
    Nemnaja Sovic

    Brian,
    You can use the following javascript syntax to open a document on local drive:
    xfa.host.gotoURL("file:///C:/yourdocument.pdf",1);

  • Problems Submitting PDF Forms via Adobe Reader XI?

    Hi,
    I have used Acrobat Pro (Versions 9/X and XI) to successfully create fillable PDF forms. I distributed the forms to a server via Acrobat, then set up a hyperlink to the form's location for my users. The users were able to fill the form and submit it.  I was able to manage the submitted form data via Adobe Tracker.  Recently, many of my users have been updated to Acrobat Reader XI.  Now, some of these same users (who have successfully submitted these forms in the past - before the latest upgrade) can no longer submit the form data!  If a user fills the form and clicks submit, it appears to that user that the form was successfully submitted, but no data appears in Adobe Tracker, even after refreshing... What would cause this??
    Thank you!

    What is your operating system?  What is your Reader XI version?  What exactly means "cannot"?

  • All Browsers hang when submitting web form

    Hi All,
    This is something that has really started to annoy me now and its effecting me on osx 10.5 - 10.7. On different machines and most strangly on different web brosers (safari, firefox etc)... However I do not have these problems if i load up windows and use safari or firefox on windows... So it must be a mac issue.
    Effectivily what will happen is I will submit a web form and occasionally it will hang for about 5 minutes.
    Now these are web forms on multiple servers that i run (php) and connecting/sending info to a MySQL database.
    Is there something that could be in the code causing this?
    This only happens on MACs. Not on Windows.
    Also sometimes it will submit the data fine... but then randomily hang.
    Any ideas?
    Kind Regards,

    Hi All,
    This is something that has really started to annoy me now and its effecting me on osx 10.5 - 10.7. On different machines and most strangly on different web brosers (safari, firefox etc)... However I do not have these problems if i load up windows and use safari or firefox on windows... So it must be a mac issue.
    Effectivily what will happen is I will submit a web form and occasionally it will hang for about 5 minutes.
    Now these are web forms on multiple servers that i run (php) and connecting/sending info to a MySQL database.
    Is there something that could be in the code causing this?
    This only happens on MACs. Not on Windows.
    Also sometimes it will submit the data fine... but then randomily hang.
    Any ideas?
    Kind Regards,

  • Invoking BPEL Process as a Web Service via AJAX / JavaScript

    So, I am able to invoke the BPEL process using the console with a nice XML SOAP fragment. If I take the same fragment and try to invoke the process using JavaScript, I get a NullPointerException:
    <2007-04-03 08:31:24,433> <DEBUG> <default.collaxa.cube.ws> SOAPRequestProvider
    java.lang.NullPointerException
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProviderHelper.getSOAPAction(SOAPRequestProviderHelper.java:431)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processBPELMessage(SOAPRequestProvider.java:231)
         at com.collaxa.cube.ws.soap.oc4j.SOAPRequestProvider.processMessage(SOAPRequestProvider.java:129)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:869)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:460)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Am I missing something here??? I have injected TCP-Mon into the mix and it is showing me the exact same message going to the web service.
    The message information that is sent looks like:
    POST /orabpel/default/C3eFormInitiation/1.0 HTTP/1.1
    Accept: */*
    Accept-Language: en-ca
    Referer: file://G:\Brad\eformInitiation\eformInitiation.html
    Content-Type: text/xml; charset=UTF-8
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; FDM)
    Host: d0027200.idir.bcgov:8081
    Content-Length: 1264
    Connection: Keep-Alive
    Cache-Control: no-cache
    Cookie: oracle.uix=0^^GMT-8:00
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:q0="http://pssg.gov.bc.ca/c3/eForms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <soapenv:Body>
              <q0:formInitiationProcessRequest>
                   <q0:locationCd>VIRCC</q0:locationCd>
                   <q0:initiatorUserId>bxworsfo</q0:initiatorUserId>
                   <q0:parentDocId>0</q0:parentDocId>
                   <q0:submittedForms>
                        <q0:submittedForm>
                             <q0:primaryForm>Y</q0:primaryForm>
                             <q0:assignmentDetails>
                                  <q0:assigneeId>bxworsfo</q0:assigneeId>
                                  <q0:assigneeTypeCd>U</q0:assigneeTypeCd>
                                  <q0:docTypeCd>IACF</q0:docTypeCd>
                                  <q0:docTypeVersion>1.0</q0:docTypeVersion>
                             </q0:assignmentDetails>
                             <q0:workflowDetails>
                                  <q0:docId>n/a</q0:docId>
                                  <q0:docFolderPrefixCd>n/a</q0:docFolderPrefixCd>
                                  <q0:docFolderSeq>n/a</q0:docFolderSeq>
                                  <q0:docSeq>n/a</q0:docSeq>
                                  <q0:workflowTaskURL>n/a</q0:workflowTaskURL>
                                  <q0:workflowDisplayFormIdentifier>n/a</q0:workflowDisplayFormIdentifier>
                             </q0:workflowDetails>
                        </q0:submittedForm>
                   </q0:submittedForms>
              </q0:formInitiationProcessRequest>
         </soapenv:Body>
    </soapenv:Envelope>
    To invoke the web service, we are just using the JavaScript code that has been generated by BPEL Process Manager. The call looks like:
    function invokeSync (url, xmlDoc) {
    var req = null; if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    if (req) {
    req.open("POST", url, false);
    req.setRequestHeader("Content-Type", "text/xml");
    req.send(xmlDoc);
    return req.responseXML;
    I have been able to invoke other web services using exactly the same function. They all seem fine.
    I am even able to use an AXIS type client to invoke the BPEL web service from Eclipse.
    Advice??? This definitely appears to be some sort of bug?
    Thanks,
    BradW

    check out 102.InvokingProcess/ws tutorial .. which uses axis .. or generate the client based on the wsdl that you can retrieve from the bpel console / click on the process/ and then wsdl tab ..
    hth clemens

  • Submitting InfoPath form via Outlook Address book.

    Hi there,
    Is it possible to have an info path form used so that there is a submit button and the user is able to choose the email address of their choice to have the form sent? Right now I only see the option of configuring a data connection with a pre filled in email
    address. 
    Example. I create a form. A user opens it and needs to submit it to one person in our organization, possibly from the Outlook address book. 
    I see a people picker but that does not allow you to submit.
    Thank you.

    Hi SarahShay,
    You can use a people picker to store the people that you want to email, then create a submit button configured to send the form by e-mial to the people of the people picker.  
    More information, please refer to the link:
    http://redcapeco.wordpress.com/2010/09/20/create-a-submit-button-in-an-infopath-form-to-email-recipients/
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Hiearchy in Planning Web Form Collapes after user Submits in SmartView

    We currently have Hyperion Planning 11.1.1.3.0 & SmartView 11.1.1.3.00
    I have a end user who opens a Planning Web Form via SmartView. When form is opened the Hiearchy in the rows are fully expanded.
    When the user hits "Submit Data" the hiearchy collapes to the top Parent level.
    I have confirmed that the Planning Webform does NOT have suppress hiearchy selected.
    Is there some setting in SmartView or Planning that I am missing that would account for this?
    I would appreciate it if anyone had any suggestions.

    Hi,
    I faced some issue similar to this in past with version 9.2, As iam updating security on planning and it works fine for data forms when i perform security refresh.
    but when user access those from excel the filters doesn't get update on EAS filters. after two hours investigation even though i update some filters on planning
    side after security refresh it doesn't get affected on essbase filters. the reason when security refresh is done the filters getting in to cache memory and doing nothing on essbase, so work around is to delete one particular filter on essbase and then perform security refresh so that it gets updated.
    Let me know if this is helpful and works.
    Thanks,
    Red

  • Submitting a form with enter key causing strange problems

    I am having a very strange problem with a webapp I am currently developing. I am using JSF 1.2 along with Facelets and RichFaces. I have coded a workflow/wizard 4-step process, and on some pages I have 4 submit buttons that all call different actions on the page. The users thought it would be useful to have the enter key submit the form, so I followed some online resources to trap a keypress using javascript, looking for the enter keycode and calling document.getElementById("elementName").click(). This works fine most of the time. Sometimes, though, it seems as if an entire new session is being created, and odd behavior starts happening. For example, my page will only include 2 of the 4 facelets on the screen -or- I will get NullPointerExceptions for objects that I know have been created in the session bean I am currently using -or- I will get a duplicate form Id after trying to re-submit the page. Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"? I'm really at my wit's end here (plus it's nearly 3 AM, that never helps things). All of the buttons being clicked are standard h:commandButtons. There is some setTimeout logic included to disable the buttons on the page to prevent double clicks (I cannot disable them onsubmit because disabled buttons don't pass the right values, perhaps that's causing it, but if so, clicking the buttons with the mouse would cause that issue too, right?)
    I am not posting the code (yet), but if anyone wants to take a look see and see if I am doing something really abhorrently wrong, I'm more than willing to, I'm just curious if anyone has had problems regarding javascript submission of forms via the click() method. Clicking the button does not exhibit this type of behavior. Just as a side note: I am doing different things with the enter key depending if a modal window is open (the enter key closes the modal if it's up, and if not, it submits the form via a button click).
    Any help is much appreciated, if anyone has any inkling about where I should start looking for answers it would be really helpful.
    Thank you.

    edfrost wrote:
    Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"?My guess is the second of these. You need to suppress the event handling after programmatically clicking the button.

  • Forms 10.1.2.0.2: Web Form does not appear at Runtime with CALL_FORM

    Hello there,
    We have a number of forms we're executing as web forms using Oracle JInitiator 1.3.1.22. We have one form in particular that, when a button is pressed, is supposed to call another form via the CALL_FORM built-in.
    We are passing a parameter list to the new form, and executing the CALL_FORM built-in with these Setting Parameters:
    CALL_FORM( formmodule_name => '<OUR_FORM_NAME>',
               display         => NO_HIDE,
               switch_menu     => NO_REPLACE,
               query_mode      => NO_QUERY_ONLY );When we run the starting form as a web form (via JInitiator 1.3.1.22), and press the button to call the other form, all buttons on the starting form are greyed-out/disabled. The called form does not appear.
    I have carried out a number of checks with my own debugging tool (stored procedure writing messages to a table via an autonomous transaction), and forms focus is definitely been transferred to the called form. For example, the WHEN-NEW-FORM-INSTANCE trigger in the called form is definitely being executed.
    I suspect this problem is JVM-related rather than Forms-specific. My current plan of attack is to request the Application Server Logs tomorrow morning (I don't currently have access to them) and see if I can find any Java-related error messages. However, if any of you reading this have experience of this type of problem and can offer any assistance, please don't hesitate to let me know your suggestions/advice.
    Cheers.
    James

    You could check the settings of the window in the calling form. If its set to "Modal" or "Dialog", and the window in the called form has other settings, the new window might be opened "behind" the old window.

  • Opening web form in SmartView 11.1.2 - decimal formatting

    I have a web form that consist of regular rows (accounts) and formula rows. The form is setup to display minimum 0 and maximum 2 decimal places for all cell types and this format is correct when I display the web form in Planning. However, when I open this web form through SmartView, these cell type precision does not retain. In fact, it always display round up whole number for regular rows and 2 decimal places for formula rows. Is this a default for SmartView? I am aware of the setting in Options > Formatting that allows me to change the decimal places, but it seems to apply to the entire grid instead of a particular row.
    My client is very specific on their format and they want to open up the web form via SmartView. Ideally we want the format that shows up in Planning to be the same in SmartView. It will be greatly appreciated if anyone can shed some light whether this can be done or not.
    Thanks,
    Kelly

    Click on File>Preferences in the workspace and you get the preferences window. If you choose Planning from the left hand side, then navigate to the "Display Options" tab, you can change the "Allow Search When Number of Pages Exceeds:" setting to be a very high number (e.g. 99999999). Click OK and return to the form and you will be presented with a "normal" drop down list. Note this is a global setting for every form.
    Regards
    Ed

  • Submitting a form with customize subject line

    Hi
    I would like some help with Submitting a form via E-mail with a customize subject line. I want the subject like to be the First name of the person which they would have to enter in the form. Is this possible?
    Thanks

    Look at this previous thread:
    http://forums.adobe.com/message/5615207#5615207
    The script would look something like:
        //Place into a submit button     
         var cSubLine = this.getField("FirstName").value;       //Replace FirstName with the name of the field on your form
         this.mailForm({
         bUI: true,
         cTo: "[email protected]",
         cSubject: cSubLine,

  • HFM - log that shows if a user has loaded data via web form or excel load.

    I can see any data loads that are coming from FDM, but is there a log that shows any data entered into HFM via web forms or submitted through an excel file? Any input is appreciated.
    Thanks

    You could enable Data Audit to capture data changes made by users, though this will not capture which method users chose to change the data. That is, HFM can show that data changed, and who changed it, but cannot tell whether the data was changed through a form, grid, smart view, or FDM. If you want to prevent users from changing data through forms, grids, or smart view, you can secure those input methods, but you cannot capture which one is used.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to create table in interactive form via Java Web Dynpro

    Hi,
    How to create table in interactive form via Java Web Dynpro ?
    Any online tutorial / example ?
    Thank you.
    Regards,
    Eric

    Hi Eric,
    Just choose the UI element Table from Form Library and drag and drop it on the form. now choose the no. of rows and columns and other settings you want about table from the wizard initiated through this process. This all is what you have to do to create the table. Now to bind it to the fields of the data source bind the individual colums to individual attributes of the node in the datasource.
    Hope it will solve your query.
    Regards,
    Vaibhav Tiwari.

  • Best web browser for submitting PDF forms

    Is there a preferred web browser for submitting PDF forms, or can recipients submit the form via any of the common browers like Explorer, Firefox, Chrome, etc.?

    We support all of the major browsers: Internet Explorer, Firefox and Chrome.
    Thanks
    Roman

Maybe you are looking for