Yeah, ive done so many copy n paste that i got everything mixed huuhuuh

But could yall explain to me how to use each() to the <cli> nodes to work with it ?

2006/9/26, Klaus Hartl < [EMAIL PROTECTED]>:


Rafael Santos schrieb:
> Hey, it's my 1st time using XML so i cant manage doin this:
>
> $.post("get_cli.cfm",{    status:"singles"    },
>         function(xml){
>            var id = $("id",this).text();
>             var nome = $("nome",this).text();
>             $("#test").html(id + nome+"<br>");
>             });
>         }


Rafael, try this please:

$.post("get_cli.cfm", { status: "singles" }, function(xml) {
     var id = $("id", xml).text();
     var nome = $("nome", xml).text();
     $("#test").html(id + nome + "<br>");
});


There was a syntax error because of an closing bracket too much and you
must use xml instead of "this" as context for your _expression_.

-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to