2

How i can send data to INFUSIONSOF using jquery? I have:

$(function(){
    $('.signup form').submit(function(e){

        e.preventDefault()

        $this = $(this);

        var email   = $this.find('.email input').val();

        if(email == '' || !checkEmail(email)){
            alert('Enter VALID EMAIL');
            return false;
        };      

        var form_method     = $this.attr('method');
        var action  = $this.attr('action');
        var serial  = $this.serialize();        

        $.ajax({
                url : action,
                type : "POST",
                data : serial,
                dataType: "jsonp",
                cache : false,
                success : function(data) {
                    console.log(data);
                }               
            });
     });

This not working, i can't get success data. I get this error"Uncaught SyntaxError: Unexpected token < 7b9db76413c68324afe2783301ed3292:109" But this error is on INFUSIONSOFT code.

napalias
  • 1,145
  • 1
  • 10
  • 21
  • Can you please post the HTML you are using for the webform? – joshmmo Sep 04 '13 at 17:21
  • 1
    i found solution: i add empty iframe tag, and form have target="myiframe" – napalias Sep 05 '13 at 10:10
  • @JauniusVencevičius can you please post the complete code? – Mau Feb 16 '16 at 00:08
  • This was long time ago. If you want only pass data to infusion just add empty iframe and for form add target="myIframe", this will prevent from page reload, and data to infusion will be send trough iframe. – napalias Feb 17 '16 at 06:48

0 Answers0