This is what my plan is
http://www.jdempster.com/wp-content/uploads/2007/08/jquery.servercookiejar.example.html
http://www.jdempster.com/wp-content/uploads/2007/08/jquery.servercookiejar.js
I can't think of any other way of doing it. Doing it synchronously ensures
that the value has been retrieved from the server before access.
/James
On 8/14/07, Michael Geary <[EMAIL PROTECTED]> wrote:
>
>
> Are you *sure* you want to do this?
>
> It locks up the browser completely - and all other browser windows in many
> browsers - until the ajax call returns.
>
> If it's just a matter of coding convenience, balance that against the
> inconvenience it will cause your visitors if the site is slow to respond.
>
> Or is there another design reason why you need the synchronous call?
>
> -Mike
>
> > From: James Dempster
> >
> > worked it out guys, silly me it's loading data synchronously
> > instead of asynchronously. Done by doing...
> >
> > function test() {
> > var html = $.ajax({
> > url: "some.php",
> > async: false // <-- heres the key !
> > }).responseText;
> > return html;
> > }
> >
> > :-) thanks all
> >
> > > I'm looking for something that will wait inside the
> > > function until it has the data to return, so not the
> > > callback type system that currently exists.
> > > Something that will mimic this type of stuff will do too.
> > >
> > > e.g.
> > > function test() {
> > > $.ajax stuff here
> > > return data; // return data from the ajax request
> > >
> > > }
> > >
> > > var bler = test();
>
>
> >
>