You can put a filter in the ultimate autohandler. I have a few popup links in my application, but I make them safe for non-js users (and for opening in new tabs) ie the href of the links is to the page say "/clients/subscribers.html", and the onclick event of the link is "window.open('/clients/subscribers.html?POPUP=1');return false;". When the link is opened in a popup, I do not want all the navigation and such to show.
So in my autohandler filter, If the POPUP param is set, I use HTML::TreeBuilder to parse the content, and then only show the content I need using that. Pascal Fleury wrote: > On Wednesday 13 December 2006 11:30, Marc Logghe wrote: > >>> -----Original Message----- >>> >> Yeah, sure. But in that way you switch off wrapping in *every* request. >> I would like to achieve that the default behaviour is wrapping (e.g. >> inherit from autohandler) but *not* in the case of an Ajax request >> (don't know what is The Best Way To Do(tm) that, simple 'nowrap=1' >> option in url or some advanced accept header checking ?) >> > > Make 2 request comps: one is the full-blown page (your_order.html) which > contains your list, and the other it the ajax-delivery boy page (order.ajax) > which is requested by Ajax from the client. Both of them will call your > component (order_items.mas), but order.ajax will have inherit=>undef > and 'your_order.html' will not have it. > > I think it makes sense also that the browser requests an HTML page, and the > JavaScript glue requests another document, even though on the server-side > they will share a lot. > > --paf > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users