Oh, right.
I haven't worked with xml before so I was thinking that if I injected
it into a div it would just show it as regular text. Guess not.

Thanks a lot man, I got it working now :-)

On 29 Maj, 14:45, malsup <[EMAIL PROTECTED]> wrote:
> What exactly do you want to have happen?  You're using the 'target'
> option to send the response to a div, but your response is XML.  That
> doesn't really make sense.  If you want to push the response to a div
> then the response should be HTML text.  If your response is going to
> be XML then you need to process it in a success handler.  For example:
>
> var options = {
>     dataType: 'xml',
>     success:  function(xml) {
>         var title = $('title', xml).text();
>         var msg = $('body', xml).text();
>         var s = '<h1>'+title+'</h1>' + '<div>'+msg+'</div>';
>         $('#loaded').html(s);
>     }
>
> };
>
> You still need the PHP header if you're going to return XML.
>
> Mike

Reply via email to