Bin-Blog logoBin-Blog

Learn about the latest in Web Development – as soon as I do.

Posts Tagged ‘pattern’

Success/Error Design Pattern For Ajax

By Binny V A • Jun 22nd, 2007

‘Success/Error’ design pattern for Ajax requests is a JSON encoded string in a specific format – each response has a minimum of two elements in it – ie ’success’ and ‘error’ – like this…
{
“success”:”Task done successfully”,
“error”:false
}
OR
{
“success”:false,
“error”:”Database Connection Error!”
}
This method is used extensivly in Nexty. Almost all Ajax response in Nexty ares in this format.
Since this [...]