Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorbackbase
    • CommentTimeFeb 9th 2010
     
    Hi,
    My company requires to send the form using ajax. For that I am trying to use a jsonRequest like this:
    var oObj = {
    'tfa_EmailAddress': "josefina+913@test.com",
    'tfa_SFGA': "backbase",
    'tfa_dbControl': "2438ffd757c569ed4102c9ae7a3ca2af",
    'tfa_dbFormId': "136566",
    'tfa_dbResponseId' : "",
    'tfa_dbVersionId': "3",
    'tfa_referrer': "http://app.formassembly.com/forms/edit/publish/136566",
    'tfa_submitAction': "register"
    };

    JSONRequest.post('http://www.tfaforms.com/responses/processor',oObj,function(requestNumber, value, exception){
    phe.lightboxManager.callToOpenLightbox(sUrl, sTitle, 'lightbox-simple');
    });

    But this gives me a 400 error code (Bad request)..
    Would you provide me an example to to this?

    Thanks in advance
    • CommentAuthordbuschho
    • CommentTimeFeb 9th 2010
     
    Hello,

    What library are you using ... jquery?
    • CommentAuthorbackbase
    • CommentTimeFeb 9th 2010
     
    Hi, I was using Backbase library but the implementation of JSONRequest is not cross domain. So now I am using jQuery and it doesnt give me any error but the data is not saved. Here is the code:

    $('form').submit(function() {
    $.ajax({
    type: 'POST',
    url: $(this).attr('action'),
    data: $(this).serialize(),
    success: function(data) {
    alert("ok");
    }
    });
    return false;
    });
    • CommentAuthordbuschho
    • CommentTimeFeb 9th 2010
     
    Hello,

    Can you point me to a test page ... what you have currently seems correct.
    • CommentAuthorbackbase
    • CommentTimeFeb 9th 2010
     
    This is a test page using the same form and script
    http://www.backbase.com/test/
    • CommentAuthordbuschho
    • CommentTimeFeb 9th 2010
     
    Ah, now I see. This is a choice on the part of JQuery to prevent you from getting hit by a xss issue. Please see:
    http://stackoverflow.com/questions/1099787/jquery-ajax-post-sending-options-as-request-method-in-firefox

    I believe either of this option should work:
    http://stackoverflow.com/questions/1099787/jquery-ajax-post-sending-options-as-request-method-in-firefox/1109334#1109334

    If not, let me know, I think I've got working code for this somewhere.
    • CommentAuthorbackbase
    • CommentTimeFeb 10th 2010
     
    Hi, thanks for your reply.I think I won't use client side for cross domain calls then.
    But do you have any example posting a form to FormAssembly using a Server Side language such as PHP?

    Thanks in advance,
    • CommentAuthorbackbase
    • CommentTimeFeb 10th 2010
     
    But if you have another client side example is ok too..

    Thanks!
    • CommentAuthorbackbase
    • CommentTimeFeb 10th 2010
     
    Hi again,
    this is not necessary anymore. I made it work using PHP finally.

    Thanks