NYCPHP Meetup

NYPHP.org

[nycphp-talk] detecting Ajax calls

Kenneth Downs ken at secdat.com
Mon Feb 26 11:50:52 EST 2007


David Mintz wrote:
> I am wondering what you guys are doing to detect whether your PHP
> script is being called via AJAX or --- "regular?" (Do we have a
> retronym for that in this brave new Web 2.0 world?).

FWIW, we're using a variant of the isAjax, passing different values to 
tell the framework to handle it in different ways.

For instance, one kind of AJAX call is a direct update of a single 
column in a single row of a table, with no response necessary, so this 
gets its own type of parameter.  The universal dispatcher catches it and 
processes it directly and exits w/o sending anything back.




-- 
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com / www.andromeda-project.org
Office: 631-689-7200   Cell: 631-379-0010

::Think you may have a problem with programming? Ask yourself this 
::question: do you worry about how to throw away a garbage can?




More information about the talk mailing list