echo '{"success":'.$success.', results:'.$javascript->Object($record).'}';
reader: new Ext.data.JsonReader({ totalProperty: 'total', successProperty: 'success', root: 'results', idProperty: 'id', etc
{"success":true, results:{"id":"47","jobId":"47","jobType":"7", "partName":"0101012","partDescription":"3.0 Metre Crossover Network Cable", "quantity":"1","price":"3.5"}}
{success:true, id:11}
{success:true}
{"total":2, "results":[{"id":"46","jobId":"47","jobType":"7", "partName":"0101104","partDescription":"Dual Back Box","quantity":"1","price":"4.26"},{"id":"47","jobId":"47","jobType":"7", "partName":"0101012","partDescription":"3.0 Metre Crossover Network Cable","quantity":"1","price":"3.5"}]}
I just wasted 20 minutes going through files looking for a white space that was causing "headers already sent" error message on login. I finally found it BEFORE the <? (i was looking at the ?> end).
Grrr....