php - jquery ajax return duplicate result (twice) -
i'm trying use jquery ajax catch form vars > send them php > result > update iframe.
but reason i'm getting result twice, example php should return: "hello world"
but i'm getting: "hello worldhello world"
$('#purchaseform').submit(function() { var serializeddata = $("#purchaseform").serialize(); $.ajax({ type: "post", url: "checkout.php", data: serializeddata }).done(function( result ) { alert(result); var $iframe = $('#plimus'); if ( $iframe.length ) { $iframe.attr('src',result); return false; } }); return false; });
thanks shai
Comments
Post a Comment