Hello everyone,

I have a Joomla website which are using VirtueMart. I want to watch the submit of a product (which is using AJAX) and when the request is succesful and complete then send a new XHR request to upload another part of the website.
How do you think I should do with Mootools?
I first success to do it but only by adding an event on the form submit. So when I click on the Add to Cart button, it is working but I would like to wait until the first request is complete.
Does it make sense?

Thank you for any help you can provide.

8 Years
Discussion Span
Last Post by br1dil

I found two ways for doing this. First it is to use the OnComplete function on XHR object, so you can launch a new function after the request is completed. The other one is by using a timer. The second function will be launch only after a predefined time is spent.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.