3.2.0

grid values to php

firstly these AJAX activewidets are the best
after a week of playing around of wanting to get data to php without using the scripting objects I ended up using cookie's. in which i load my load from the grid to the cookie and submit my form and echo back the cookie data in php
In javascript the following reads the grid and create a cookie
function savegrid()
{
var data="";

for(var gridRow=1;gridRow<=obj.getRowCount();gridRow++)
{
for(var gridColumn=0;gridColumn<obj.getColumnCount();gridColumn++)
{
data += gridRow+""+gridColumn+":"+obj.getCellText(gridColumn, gridRow)+"/";
}
}
document.cookie = "cargoList="+data+";expires=Thur, 31-Dec-2099 12:34:56 GMT";
}

then in php

echo $_COOKIE['cargoList']."<br>";

to get each cookie item you can then explode by '/'.
CEO The Boss
August 4,

This topic is archived.

See also:


Back to support forum