PDA

View Full Version : Post data store to PHP



andreluige
8 Nov 2009, 5:37 PM
Hello guys...

I'm looking for the best way to send a data store content with post method on submit event of my form.

right now... I'm doing this with the code below:



var records = grid.getRange();

if (records.length > 0) {
var pacelas = "[";
pacelas += Ext.util.JSON.encode(records[0].data);
for (var cnt = 1; cnt < records.length; cnt++) {
var record = records[cnt];
pacelas += ',' + Ext.util.JSON.encode(record.data);
}
pacelas = pacelas.substring(0, pacelas.length) + "]";
}


so them... in my submit function I send the parcelar var with something like this:



params:{pacelas:pacelas}
someone know another or the best way to send the data store content on submit event?

thx..

cya...