Benjamin, thanks for your reply.

I've started with the $.post func though like this: $.post("/
backend.php",{},function(xml){update_view(xml); } );

then: update_view(xml){
var messages = [] ;
$('message', xml).each( function(i){ //go through each message

$this = $(this); //jquery object.
messages[i] = {
                        bio: $this.find("bio").text(),
                        voted:$this.end().find("voted").text()
                        };
alert (messages[i][voted]);

}

}//end update_view

the alert is outputting an undefined value, and not the text as I
expected. I'll post a solution when I find it, but thanks very much
for your help.

On Jul 15, 11:04 am, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> quez,
> I use the $.ajax with dataType set to xml; on success I set a global
> variable to the contents of the xml.  Once it is done, I get the info doing
> something like:
>
> $('response/message:eq(0)/bio', globalXML).text();
>
> :eq(0) will grab the first message :eq(1) will grab the second one and so
> on.
>
> I use this technique of a few 
> sites,http://airplume.informationexperts.com/module.htm#m-1000being one of 
> them.
>
> Check outhttp://airplume.informationexperts.com/common/js/core.jsand look
> at the loadXML function at the bottom of the page and then look at the
> buildPage function that is about mid-way up the page and you will see how I
> call everything in.
>
> On 7/14/07, quez <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > my xml looks something like:
>
> > <response>
> >    <message>
> >        <bio>the bio</bio>
> >         <voted>the votes</voted>
> >    </message>
> >    <message>
> >        <bio>another bio</bio>
> >         <voted>likewise, another vote</voted>
> >    </message>
> > </response>
>
> > I'm new to jquery. I'd like to place these in an array so I can access
> > votes/bio easily and separately. at the moment, jquery is returning it
> > like this: "the bioanother bio" . Any help is much appreciated. Thanks.
>
> --
> Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com

Reply via email to