<%doc> This is the autohandler that I use on my www.maztravel.com server. I want it to be part of the autohandler chain, so I left out the inherit => undef line. <%perl> # Here is what you need to do to make autohandlers play nice # with Ajax XMLHttpRequest requests. Otherwise your autohandler # may spew out a bunch of stuff that your response doesn't # want to deal with. if ($r->header_in('X-Requested-With') eq 'XMLHttpRequest') { $m->call_next(); } else { <& order:navigate &> % $m->call_next(); <& order:navigate &> % } <%once> use HTML::Prototype; use YAML;