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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.