ArnisR Posted June 16, 2011 Report Share Posted June 16, 2011 Kā ar jQuery pārbaudīt, vai notiek Ajax pieprasījums? Piemēram, nospiežot pogu, darbībām jāizpildās tikai tad, kad pabeigts Ajax request's: $("button").click(function(){ if(darbojas Ajax) { return false; } else { Izpildīt dažādas darbības... } }); Quote Link to comment Share on other sites More sharing options...
briedis Posted June 16, 2011 Report Share Posted June 16, 2011 Izbrauc šitam cauri, vajadzētu saprast :) http://api.jquery.com/jQuery.ajax/ Quote Link to comment Share on other sites More sharing options...
daGrevis Posted June 16, 2011 Report Share Posted June 16, 2011 Tā kā šī ir PHP sadaļa, tad, izlasot tikai virsrakstu, pareizā atbilde ir... if ( isSet( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && strToLower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) === 'xmlhttprequest' ) P.S. Pārvietoju. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.