I am trying to get my grid to load data using ScriptTagProxy. I am able to see the JSON records in FB:Net:HTML:Response.
Under Params I see stcCallback1001. The GET is displaying the param as:
Code:
http://10.0.0.100/bms-hr/index.php/users/list_users/?_dc=1284415387926&callback=stcCallback1001
store info:
Code:
var remoteProxy = new Ext.data.ScriptTagProxy({
api: {
read : 'index.php/users/list_users/',
create : 'index.php/users/insert_users/',
update: 'index.php/users/update_users/',
destroy: 'index.php/users/delete_users/'
}
});
var dataStore = new Ext.data.JsonStore({
proxy: remoteProxy,
root: 'users',
autoLoad: true,
autoSave: false,
successProperty : 'success',
totalProperty : 'totalCount',
messageProperty: 'message',
idProperty: 'id_user',
writer: writer,
fields: userFields
});
CI:Controller: users.php
Code:
function list_users() {
$data = json_encode($this->User_model->list_users());
$cb = isset($_GET['callback']) ? $_GET['callback'] : '';
print $cb . '(' . $data . ')';
}
$_GET['callback'] is not returning a value from my controller file.
Is CI causing this, or my code?
Regards,
Scott.