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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -