Re: Detect ajax request

2007-04-11 Thread Ryan Kanno
Ahh... that's what I was missing. Thanks, Nathan (as I'm also using jQuery). :) On Apr 10, 6:23 pm, "Nathaniel Whiteinge" <[EMAIL PROTECTED]> wrote: > I've been happily using limodou's suggestion with the jQuery framework > for a few weeks, hopefully whatever framework you're using also sends >

Re: Detect ajax request

2007-04-10 Thread Nathaniel Whiteinge
I've been happily using limodou's suggestion with the jQuery framework for a few weeks, hopefully whatever framework you're using also sends the X-Requested-With header--it just feels cleaner. if request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest': # do stuff... - whiteinge On Ap

Re: Detect ajax request

2007-04-10 Thread Tim Chase
> Is there a standard way to detect if a request was an ajax one? I > know I could append a key to the ajax request like in Mr. Bennett's > post here: > > http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1 > > ie http://website.com/some/request/?xhr and in my view, d

Re: Detect ajax request

2007-04-10 Thread limodou
On 4/10/07, Ryan Kanno <[EMAIL PROTECTED]> wrote: > > I've searched Googs and this group for an answer to the following > question: > > Is there a standard way to detect if a request was an ajax one? I > know I could append a key to the ajax request like in Mr. Bennett's > post here: > > http://

Detect ajax request

2007-04-10 Thread Ryan Kanno
I've searched Googs and this group for an answer to the following question: Is there a standard way to detect if a request was an ajax one? I know I could append a key to the ajax request like in Mr. Bennett's post here: http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-pa