jquery mobile submits form multiple times

44 Views Asked by At

I am new to jquery mobile. I am developing an application using jquery mobile. I have got a form which on submitting fires multiple submits. Code is as below:

$(document).on('click', '#btnUpdateExperience', function() {

    var posting = $.post( "mypage.php", $('#frmabc').serialize() );
    posting.done(function( data ) {         
        $.mobile.loading( "hide" ); 
        if(data == 1)
        {
            $.mobile.changePage("profile.html", {transition:"slide"});
            return false;
        }
        else
        {
            showToastMessage(data); 
        }

    });
});

Please let me know where I am wrong.

0

There are 0 best solutions below