NYCPHP Meetup

NYPHP.org

[nycphp-talk] Ajax 101: what to return from a POST

Tim Lieberman tim_lists at o2group.com
Thu May 3 15:48:15 EDT 2007


Oh, cool.

-Tim
On May 3, 2007, at 1:25 PM, Felix Shnir wrote:

> Jon means that the response status should be 412...
>
>         var req = this.getTransport();
>         req.open('POST', uri, true);
>         req.onreadystatechange = function (aEvt) {
>           if (req.readyState == 4) {
>              if(req.status == 200)
>               var r = eval(req.responseText);
>
>                if(req.status == 412)
>                   alert("error has occured: " + req.responseText);
>               }
>           }
>
> Felix
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070503/298641b5/attachment.html>


More information about the talk mailing list