On Mar 12, 2008, at 10:11 AM, Jennifer Ahn wrote:
I'm sure that JSON and all the other goodies are perfect tools for implementing ajax, but i would like to learn what's really going on in teh black box before I use it.

So far, my javascript is able to send an xmlhttprequest to my catalyst controller method which then does some processes and outputs data into an xml document. i'm having trouble sending that document over to my xmlhttprequest.responseXML object.
in my controller:
 my $writer = new XML::LibXML::Document;
 ... do some process and spit out into an xml document...
 $c->response->content_type('text/xml');
 $c->response->write($writer);

I think that should be (or at least would work as)-

$c->response->content_type('application/xml'); # text/xml is deprecated
  $c->response->body($writer->serialize);

-Ashley


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to