View Full Version : pls help, its very urgent!!!

24 Mar 2007, 3:51 AM
Hi all,
I have an ext grid(remote-paging) which is working fine.
Now I want the grid to be shown according to the contents of a page ie textboxes.

ie I have a page1.php which contains some textboxes(autocomplete) which has an action page where in the grid comes.. when I click on submit button, the data should come in the grid according to the contents of the page1.php. Here I have a php page page2.php which supplies data to the store. My query in pge2.php is correct but the problem is that the value of the text box from page1.php can not be passed to page2.php( which is called by javascript) I tried using session but it does not work.

How can I solve this problem?

please respond immediately!!!!!!

Thanks in advance

24 Mar 2007, 9:48 AM
You need to pass params when the Store makes its request for data?


myStore.baseParams = {name:"value"};

Store adds the base params to every request it makes.

24 Mar 2007, 10:59 PM
Thank u for replying ,

Animal, please make it little more simpler.

where should i add

myStore.baseParams = {name:"value"};

I repeat the scenario.

The textbox value from page1.php should be passed to page2.php which is in turn called by a js file linked from action.php which is the action page of page1.php.

ie I have to fill up the grid according to the text box value of page1.php

I hope u r clear now!

25 Mar 2007, 4:29 AM
It's not an Ext issue really is it? It's just you don't want to think about it.

You send params back to your PHP scripts, and you can send values back out to pages either in generated script, or in hidden input fields. It's up to you.

28 Mar 2007, 4:20 AM
Hi Animal,

I have posted the base parameter with store.

var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: 'grid_services2.php', method:'post'}), //get data from server
reader: new Ext.data.JsonReader({
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'}
baseParams: {
name: 'text1' // value of textbox
remoteSort: true

Firebug shows the posted variable too.

dir ASC
limit 12
name text1 // // required variable
sort TravelsName
start 0

but I could not receive the value in grid_services2.php!

what is the problem?

28 Mar 2007, 5:10 AM
Can't help, sorry. The data is being posted to the server according to Firebug.

You could check with Fiddler, but I suspect it's a problem at the PHP end.

28 Mar 2007, 5:38 AM
In your php file, are you using the $_POST['name']? Alternatively you can use $_REQUEST['name']