[jQuery] Re: Callback of AJAX call must determine what happens after the AJAX call... how?!? (form plugin)

2007-04-01 Thread Mike
> Since I'm not very experienced with asynchronous stuff in Javascript I > don't know whether this is a flaw in jQuery or an inevitable result of > the way AJAX works. In the latter case, I guess that the architecture > of the jQuery form plugin is flawed. Or I must be overlooking a > possibility

[jQuery] Re: Callback of AJAX call must determine what happens after the AJAX call... how?!? (form plugin)

2007-03-31 Thread Erik Beeson
I think your design is poor. The problem is you shouldn't be trying to "inject" an ajax call in the beforeSubmit callback. I suggest one of two things: at the point of making a request to the server, why not just do the validation step on the server side? Calling out to the server to find out if

[jQuery] Re: Callback of AJAX call must determine what happens after the AJAX call... how?!? (form plugin)

2007-03-31 Thread Matt Stith
I would create 2 functions, like if (result == 'validation succeeded') { someSuccessFunction(); return; } someFailFunction(); return; } On 3/31/07, tawm <[EMAIL PROTECTED]> wrote: Hello people, I'm in a situation right now in which I do an AJAX call, supplying it a callback fun