I try to make a basic progress bar with ajax , when I click button add to cart, but I don't know how catch the xhr on console,to put on alert() or prepend()function

I follow a video example in youtube, with XMLHttpRequest() function but I see doesn't work

see the code:

var xhr = new XMLHttpRequest();

xhr.upload.addEventListener('progress', ProgressHandler ,false);
xhr.addEventListener('load', CompleteHandler,false);
xhr.addEventListener('error', errorHandler,false);


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.