that's it!

On Thu, Feb 19, 2009 at 5:09 PM, websam <[email protected]> wrote:

>
> Ok if i understand you right i should simply create my table in the
> onSuccess function and add the data to my table from the JSON returned
> from the request ?
>
> On 19 Feb., 17:01, Thierry bela nanga <[email protected]> wrote:
> > you may be the onSucces to perform what you want,
> > loadJSON: function(url) {
> >
> >    if(!this.result) new Request.JSON({
> >        url: url,
> >        method: 'get',
> >        onSuccess: function(json) {
> >            this.result = json;
> >        }.bind(this)
> >    }).send();
> >    return this.result;
> >
> > }
> >
> > this is not really clean, you should use the onSuccess callback to
> perform
> > what you want.
> >
> > On Thu, Feb 19, 2009 at 4:53 PM, websam <[email protected]> wrote:
> >
> > > Ok, thats nice to konw, but how do i then return the data ?
> >
> > > On 19 Feb., 16:48, Thierry bela nanga <[email protected]> wrote:
> > > > that's normal,
> > > > the function does not wait the request to complete before it returns.
> >
> > --
> > fax : (+33) 08 26 51 94 51
>



-- 
fax : (+33) 08 26 51 94 51

Reply via email to