getting mootools to run after ajax returns true?

Joined
12 Feb 2006
Posts
17,626
Location
Surrey
is there a simple way to get a mootools effect to run only after ajax returns true.

at the moment mootools seems to be giving ajax a problem in that it randomly will stop ajax running, sometimes until refresh, sometimes just once twice, sometimes never and i'm hoping this will fix the problem if it's do able?

thanks


also (although this is far less priority atm) i tried using the fx.slide effect to hide the element clicked which can be in a vertical list of other elements. although the element was hidden the margin wasn't removed so as each element was hidden the gap between each became bigger and bigger. i tried using morph to do this, which it does though only if it's the first element otherwise same problem, it's far uglier as it kind of jumps to the side. i also used javascript to remove the margin but then it jumps the element up 10px then slides it away so again looks ugly.

any fix for this?
 
Last edited:
Yes. There are a number of standard XHR events you can attach callback functions to.

been looking at how this works last couple of days and i seem to understand it now though need a bit of help with it.

is there an easy way to say on return true/on return false? atm i know if the request was successful so the morph effect takes place but this is no good as the ajax could have returned false but the user will think it returned true as the effect is shown. how do i deal with this?
 
Last edited:
Back
Top Bottom