how can I pass a parameter to a php script

Hello,

In a grid, I have a doOnRowDblClicked function which opens a window with a “detail” grid.
I want load this “detail” grid by a php script with parameter.
How can I do this ?

Here is a piece of code not working

detailGrid.init();
detailGrid.load(“ca30.php?idMag=” + myGrid.cells(rowId, 1), “json”);

In ca30.php, I have a select with a where condition based on the value passed by paremater “$get[id_Mag]”.

Thanks for your help.
Best regards.

Does anybody can’t help me or my question is not relevant ?

Please, check what is returning from the:
myGrid.cells(rowId, 1) in your case.

If the grid has no data it will give the error, if the grid has data the cell object will be returned.

Thank you Sematik,

I forgot “.getValue()”.

Here is my piece of code :

function doOnRowDblClicked(rowId){
			var id_Mag = myGrid.cells(rowId, 13).getValue();

			dhxWins = new dhtmlXWindows();
			dhxWins.attachViewportTo("winVP");
			var detailWin = dhxWins.createWindow("detailWin", 40, 40, 850, 420);
			detailWin.setText("30 derniers jours d'activité du magasin " + myGrid.cells(rowId, 2).getValue() + ", Id : " + id_Mag );
			detailWin.setModal(true);
			var detailGrid = detailWin.attachGrid();
			detailGrid.setImagePath("codebase/imgs/");
			detailGrid.setHeader("Date,CA TTC,Vente HT,Achat HT,Marge HT,Taux de Marque (%), Frequentation,Panier,CA HT au m2", "|");
			detailGrid.setInitWidths("90,90,90,90,80,85,85,85");
			detailGrid.setColAlign("center,center,center,center,center,center,center,center,center");
			detailGrid.setColTypes("ron,ron,ron,ron,ron,ron,ron,ron,ron");
			detailGrid.setColSorting("strnt,int,int,int,int,int,int,int");
			detailGrid.setNumberFormat("0,000.00 €",1);
			detailGrid.setNumberFormat("0,000.00 €",2);
			detailGrid.setNumberFormat("0,000.00 €",3);
			detailGrid.setNumberFormat("0,000.00 €",4);
			detailGrid.setNumberFormat("00.00 %",5);	
			detailGrid.setNumberFormat("0000",6);
			detailGrid.setNumberFormat("0,000.00 €",7);	
			detailGrid.setNumberFormat("0,000.00 €/m2",8);
			detailGrid.enableAutoWidth(true);
			detailGrid.init();
			var appel = "ca30.php?id_Mag='" + id_Mag + "'";
			detailGrid.load(appel, "json");
		}

But there is a small problem :
If I write directly detailGrid.load(“ca30.php?id_Mag=’” + id_Mag + “’”, “json”);
it doesn’t work, I need to use a variable.

But this workaround is Ok.

Best regards