samedi 9 mai 2015

jquery ajax beforesend wait before sending

I am trying to use settimeout in the ajaxsetup beforesend function, but what seems to happen is the ajax is sent and the wait function is called after the timeout. I want to stop the requests from sending for the timeout period

jQuery.ajaxSetup({
    beforeSend: function(){
        setTimeout(continueExecution,1000)

        return true;
    }
});

Can someone suggest me a way to stop the requests from being sent from ajaxsetup

Aucun commentaire:

Enregistrer un commentaire