Hey, thanks. The $.get JSON sounds right.  How do I now construct the
Ajax Json statement? The Json data is being returned from the server
in a list called 'result'.  Cheers!

Dinesh


On May 4, 1:47 pm, the_woodsman <[EMAIL PROTECTED]> wrote:
> If your AJAX call returns JSON, you might be better off using the JSON
> specific ajax methods.
>
> If you're new to JQ and JS, do you use Firebug in Firefox? With that
> tool, you can more easily check what's being returned from your ajax
> call etc.
>
> On May 4, 9:18 pm, dineshv <[EMAIL PROTECTED]> wrote:
>
> > First, I'm very new to JS/JQ.  I've got a simple HTML list of items
> > that I want updated from the server whenever the user requests it (by
> > hitting a submit button).  The results from the (Python/webpy) server
> > are held in a list result[].  Here is the html:
>
> > <div id="results">
> >     <p>"$result[0]"</p>
> >     <p class="alt">"$result[1]"</p>
> >     <p>"$result[2]"</p>
> >     <p class="alt">"$result[3]"</p>
> >     <p>"$result[4]"</p>
> > </div>
>
> > This is what I have so far:
>
> > $.get("/ac", function(data) {
> >     $("result", data).each(function(result_number) {
> >         var result_text = $("result", data).get(result_number);
> >     $("#results").append("<p>".$(result_text).text()."</p>");
> >     });
>
> > });
>
> > Which doesn't work!  I'd like to return the results in JSON format for
> > performance.  I know this is very simple to do and all help
> > appreciated.
>
> > Dinesh

Reply via email to