Hi Tim thanks for replying,
here is the code.
combo:
Code:
Ext.namespace('Ext.exampledata');
Ext.exampledata.cities = [ // array for source
[ 'Bangalore'],
['Chennai'],
[ 'Cochin'],
[ 'Calicut'],
[ 'Guntur'],
[ 'Hyderabad'],
[ 'Mangalore'],
[ 'Mysore']
];
Ext.exampledata.cities2 = [ // array for destination
[ 'Bangalore'],
['Chennai'],
[ 'Cochin'],
[ 'Calicut'],
[ 'Guntur'],
[ 'Hyderabad'],
[ 'Mangalore'],
[ 'Mysore']
];
Code:
Ext.onReady(function(){
// simple array store
var store = new Ext.data.SimpleStore({
fields: [{name:"select"}],
data : Ext.exampledata.cities // from cities.js
});
var store2 = new Ext.data.SimpleStore({
fields: [{name:"select"}],
data : Ext.exampledata.cities2 // from cities.js
});
var combo = new Ext.form.ComboBox({
store: store,
displayField:'select',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'- Select -',
selectOnFocus:true
});
var combo2 = new Ext.form.ComboBox({
store: store2,
displayField:'select',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'- Select -',
selectOnFocus:true
});
combo.applyTo('from');
combo2.applyTo('to');
});
grid:
Code:
<?php
//echo $text1;
$a=$from;
$b=$to;
//
?>
<script type="text/javascript">
var myGrid = function() { // -------Mygrid ----//
return { //---------rturn-----//
init: function() { //----------init-----//
//we enable the QuickTips for the later Pagebar
Ext.QuickTips.init();
var ds = new Ext.data.Store({ //---dats.store---//
proxy: new Ext.data.HttpProxy({url:'grid_services2.php',method: 'POST'}), //get data from server
reader: new Ext.data.JsonReader({ //----JSON Reader-----//
root: 'mygrid',
totalProperty: 'totalCount',
id: 'Servicenumber'
},
[
{name: 'serviceid', mapping: 'serviceid', type: 'int'},
{name: 'Servicenumber', mapping: 'Servicenumber', type: 'string'},
{name: 'TravelsName', mapping: 'TravelsName', type: 'string'},
{name: 'Source', mapping: 'Source', type: 'string'},
{name: 'Destination', mapping: 'Destination', type: 'string'},
{name: 'BusType', mapping: 'BusType', type: 'string'}
]), // .....ends JSON Reader -------//
baseParams:{
name:'<?php echo $a; ?>',
name1:'<?php echo $b; ?>',
},
// turn on remote sorting
remoteSort: true
}); //---ende data.stores---//
ds.setDefaultSort('TravelsName', 'asc');
var cm = new Ext.grid.ColumnModel([
{header: "From", dataIndex: 'Source', width: 140, sortable: true, align: 'left'},
{header: "To", dataIndex: 'Destination', width: 140, sortable: true},
{header: "serviceid", dataIndex: 'serviceid', width: 60, sortable: true},
{header: "Travels", dataIndex: 'TravelsName', width: 140, sortable: true},
{header: "Bus Type", dataIndex: 'BusType', width: 140, sortable: true},
{header: "Service Number", dataIndex: 'Servicenumber', width: 180, sortable: true}
]);
cm.defaultSortable = true;
var grid = new Ext.grid.Grid('tutorial-grid', { //grid DIV
ds: ds,
cm: cm,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
enableColLock:true
});
// render the Grid
grid.render();
var gridFoot = grid.getView().getFooterPanel(true);
// add a paging toolbar to the grid's footer
var pagbar = new Ext.PagingToolbar(gridFoot, ds, {pageSize: 12});
ds.load({params:{start:0, limit:12 }});
}
};
}();
Ext.EventManager.onDocumentReady(myGrid.init, myGrid, true);
</script>
This code works fine in IE(I could filter the grid) , but not in firefox.
firebug shows that base parameters are posted without any value in them.
It doesn't give error too...
Any idea.............