javascript - Run PHP script in background using jQuery -
so have php takes time runs in background. want code "command executed. invites pending." - , user see end. else in .php script done in background.
i thinking somehow executing jquery , have stop loading script mid-execute of post. , use ignore_user_abort()
here jquery code plan on using:
jquery.ajax({ type: 'post', data: { ' mypostdata'}, datatype: 'html', url: 'myphp.php', success: function (d) { /* commands */ } });
the thing i'm missing having stop call after it's called upon, , need append div saying "invites pending."
almost identical jquery's site example:
alert( "initializing..." ); var jqxhr = $.post( "myphp.php", function(data) { alert( "working..." ); }) .done(function() { alert( "finished!" ); }) .fail(function() { alert( "error!!" ); }) });
Comments
Post a Comment