Looks like your request worked and you got XML back. You can try 
inspecting the XML response to see what was return to extract the data 
manually or if you could also try wrapping the XML document in a jQuery 
Object and calling the .html() method to get the value of your xml 
response without any dirty work. I don't know if that works or not, I 
haven't worked with ajax for over six months and it was before I 
discovered jQuery. Hope this helps:

$.get("/rgeo/",
        { x: document.rgeo.x.value, y: document.rgeo.y.value },
        function(data){
                console.log(data);
                $("textarea#response")[0].value = $(data).html();
        }
);

-blair

djl wrote:
> Hi all,
>
> How do I get the XML response of an ajax request? I want to put the XML 
> text into a textarea and can do find this documented.
>
>              $.get("/rgeo/",
>                  { x: document.rgeo.x.value, y: document.rgeo.y.value },
>                  function(data){
>                      console.log(data);
>                      $("textarea#response")[0].value = data;
>                  }
>              );
>
>
>
> My textarea ends up with the string "[object XMLDocument]"
>
> I also tried:
>
>
>              $.ajax({
>                  url: "/rgeo/",
>                  dataType: "xml",
>                  data: {
>                      x: document.rgeo.x.value,
>                      y: document.rgeo.y.value
>                  },
>                  success: function(data){
>                      console.log(data);
>                      $("textarea#response")[0].value = data;
>                  }
>              });
>
> Thanks,
>    -Steve


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

Reply via email to