3.2.0

onClick submit form

Hi all,

first of all, it is a wonderful grid

i use php.

i have a hidden column with the name "id".

How can i make that when the user change the selection, the script post the form with a var what containts the id?

so that i get a var "$_POST['id']???
Zitz
June 25,
Well, it seems that nobody on the forum has a clear and simple solution for you...

I's been checking' round the form for a hour now, and ... not found a thing! I am willing to buy this tool soon to replace another grid module, but if I can only display data on the page, and not retrieve it... is helpless...

So I am also looking for an easy way to retrieve via form a variable value in $_POST['something'] that contains all values from the grid that was just displayed!!!

Hoping for simple solution!

Gran
Gran
July 16,
Try something like this... for enter key, but works also fine for simple and dblclik...

HTML :
<div id='Grid_Form'></div>
PHP : you get a variable in post ... $data[rowNum][colName]
JS :
obj.setAction("IsKeyEnter",function(src)
{
if (event.keyCode==13)
{
Loading();
var formulaire = "<form method=post action='?' id='formulaire'>";
var input = "";

for (i = 0; i<= myData.length - 1; i++)
{
for (j = 0; j<= myColumns.length - 1; j++)
{
input = "<input type='hidden' name='data[";
input += i;
input +="][";
input += myColumns[j] ;
input +="]' value='";
input += obj.getDataProperty("text",i,j);
input += "'>";
formulaire += input;
}
}
formulaire += "</form>";
document.getElementById('Grid_Form').innerHTML = formulaire;
document.getElementById('formulaire').submit();
}
});
Gran
July 28,

This topic is archived.

See also:


Back to support forum