ZooKeeper
30 Oct 2007, 4:34 AM
Json, formed by Python
{'msg': 'hey', 'success': False}
Ext.Ajax.request({
method: 'post',
callback: function(opts,suss,resp){
var jsonData = Ext.decode(resp.responseText);
if (!jsonData.success) {
Ext.MessageBox.alert('Error', jsonData.msg);
} else {
// Do something clever
}
}
Firebug:
False is not defined
return eval("(" + json + ')');
extall:
this.decode = function(json){
return eval("(" + json + ')');
};
It appears that Ext expects JS-like false
{'msg': 'hey', 'success': False}
Ext.Ajax.request({
method: 'post',
callback: function(opts,suss,resp){
var jsonData = Ext.decode(resp.responseText);
if (!jsonData.success) {
Ext.MessageBox.alert('Error', jsonData.msg);
} else {
// Do something clever
}
}
Firebug:
False is not defined
return eval("(" + json + ')');
extall:
this.decode = function(json){
return eval("(" + json + ')');
};
It appears that Ext expects JS-like false