samedi 16 juillet 2016

Listen to HTTP Request to trigger some action

I am using a 3rd party app Bt.tn which provides me a virtual button to press.

On pressing the virtual bttn, a HTTP request to URL which I choose is originated.

Now I am trying to listen to this originated Request on my URL so that whenever the bttn is pressed, I want to trigger some action like alert().

I have tried using this piece of code but it doesn't help:

$(document).ajaxComplete(function(event,request, settings){
    alert("I just listened to a bt.tn request!");
});

Can anyone help me on this? Thanks!

Aucun commentaire:

Enregistrer un commentaire