Yes, I got the part about the HTTP response code.

I am trying to pose a question about what else to do  if validation fails,
i.e., req.status == 412:  send back the redrawn form w/ errors and display
it, or send back just the validation error messages as a JSON object and
work with that?

On 5/3/07, Felix Shnir <[EMAIL PROTECTED]> 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



--
David Mintz
http://davidmintz.org/

Just a spoonful of sugar helps the medicine go down
In the most delightful way.
_______________________________________________
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

Reply via email to