I am using slideUp and slideDown in the beforeSend ajax event which works fine is firefox, but in other browsers, the ajax postback seems to complete before the slideUpDown has completed so my success function is executed first, then the slideUp/Down.
How can I change it to either (1) not send the ajax until the slideUp/Down have completed or (2) not process the result in the success function until the slideUp/Down have completed?
I tried creating a isAnimationFinished variable which is set when the slideDown has finished and in the success, I have an empty while loop that waits for this variable, but I get an error about a script running slowly if I try this.