Fairly new to AJAX and this Async stuff...

The errback callback is only invoked upon HTTP header status codes I  
assume.

So the question is, what is a good model to communicate application  
level messages and errors?

E.g. I'm doing a POST to insert a database record. Assume this fails  
on the and I want to have my client-side to handle this gracefully.  
Same would go for server side validation of other sorts. What's a  
good way to send this meta-data back which is easy to use by the client?

Right now, I'm just returning html snippets. Not doing anything with  
JSON or XML yet.

In one case, I'm returning multiple snippets separated by a 'well- 
known' string. The client 'splits' the responseText and put's each  
snippet part where it belongs. I suppose, one could add a simple  
protocol header ahead of the snippets and interpret that upon success  
to handle such situations.

But I'm always looking for good and reusable solutions, especially  
within MochiKit. So if anyone with more experience than me can make  
some suggestions here, I'd really appreciate it.

Thanks,
Juergen



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to