Well, if you're aware of the side-effects, that's fine by me.

Still it's a bit like using an h-bomb to treat cancer patients, sure it's
likely to cure it 100% of the times, as long as you don't mind your patient
dying in the process.

Michel Belleville


2009/11/16 nowotny <nowotn...@gmail.com>

> On 16 Lis, 11:40, Michel Belleville <michel.bellevi...@gmail.com>
> wrote:
> > Well for a start I wouldn't use a this kind of pause() trick if I were
> you,
> > it's pretty brutal suff looping along until time has passed will likely
> > freeze your interface and that's a bad thing.
> Like I said... it's only a stand in for the ajax call that'll replace
> it in the end... the thing is I have to test if on the IP and port the
> user specified there is a certain service running and if a user puts
> in an invalid IP (where the service is not running) the ajax call
> takes some time (until timeout) to process... during that time the
> interface is frozen and I want it to be... I just want it to show that
> it's testing the connection and I thought putting "Testing" into DOM
> before doing the ajax call would inform the user what's happening but
> it's not being changed until after the whole function finishes
> processing when it's already to late cause I already have the results
> of the ajax call...
>
> > You'd probably be better off
> > with a setTimeout() which would delegate exécution of a callback after
> the
> > time, thus truely imitating an Asynchronous call.
> Again, I said I want to do a synchronous ajax call... and I don't need
> to delay anything so setTimeout() is not needed here...
>
> --
> nowotny
>

Reply via email to