Hello,
I'm really stuck on this. So if anyone can help me...
With php I'm passing a value back to an Ajax request.
Something like this:
{"field1":{"isEmpty":"this field can not be empty"},"field2":{"isEmpty":"this field can not be empty"}}
I can get the value in my javascript like this:
msg = Ext.decode(response.responseText);
alert(msg.field1.isEmpty);
alert(msg.field2.isEmpty);
But I don't want it to be an object. Can I make it an array? Because the number of fields are not always the same. With an array I can loop through the messages and show the alerts.
I hope it's a little bit clear...
The One And Only KryptoS
I'm really stuck on this. So if anyone can help me...
With php I'm passing a value back to an Ajax request.
Something like this:
{"field1":{"isEmpty":"this field can not be empty"},"field2":{"isEmpty":"this field can not be empty"}}
I can get the value in my javascript like this:
msg = Ext.decode(response.responseText);
alert(msg.field1.isEmpty);
alert(msg.field2.isEmpty);
But I don't want it to be an object. Can I make it an array? Because the number of fields are not always the same. With an array I can loop through the messages and show the alerts.
I hope it's a little bit clear...
The One And Only KryptoS