Re: [jQuery] Setting a global variable

2006-12-07 Thread kazaar
Chris Domigan wrote: Synchronous ajax calls freeze the entire *browser* until completed, not just the current script, whereas asynchronous calls do not. Google ajax synchronous for better info on why this is not desirable behaviour. It could be, that I've been using too much Firefox

Re: [jQuery] Setting a global variable

2006-12-06 Thread kazaar
Chris Domigan wrote: Having your scripts broken down into several functions isn't at all an ugly way to do things. IMHO everything should be in a function except for globals. Makes program control a lot easier :) See following 3 different ways to do the same thing. When referring to

Re: [jQuery] Setting a global variable

2006-12-06 Thread kazaar
I'm aware of this, but there can be situations where script can not be allowed to continue, before certain stuff has been done for sure. Klaus Hartl-3 wrote: Synchronous loading isn't the wisest thing to choose. If for instance the request needs a long time due to network problems or

Re: [jQuery] Setting a global variable

2006-12-05 Thread kazaar
Thank you for quick answers. However, problem still exists. Latter alert-function would still fail, because variables wouldn't be set yet at that moment (I will need those variables later in another call to server). Problem falls back to asyncronous loading. Isn't there an easy way to use

Re: [jQuery] Setting a global variable

2006-12-05 Thread kazaar
Ok, I'm choosing that path while waiting for jQuery 1.1. Works fine. It's not so critical issue, but the resulting code looks.. well, silly. Chris Domigan wrote: Synchronous loading is proposed for jQuery 1.1. But I'm sure callbacks would be able to do what you need... Couldn't you just