Hello:

I need to dynamically edit and change the server data.

http://pssnet.com/~devone/ajqtable/editgrid2.html

Right now, when the fields get edited php posts names instead of
values to the db.

My assumption is that on submit, the editurl will be called upon with
the changed data.

I read in the docs that I may have to add an onSubmit function (as
shown below).

Thank you for you help.

Regards,
Nat


<?php
include("dbc.php");
$var1 = $_POST['service_id'];
$var2 = $_POST['name'];

// $var1 = "abc";
// $var2 = "xyz";

mysql_query("INSERT INTO
testwrite (service_id, name)
VALUES('$var1', '$var2') ")
or die(mysql_error());

?>


onclickSubmit : function(eparams) {
    var retarr = {};
    // we can use all the grid methods here
    //to obtain some data
    var sr = jQuery("#grid_id").getGridParam('selrow');
    rowdata = jQuery("#grid_id").getRowData(sr);
    if(rowdata.somevalue=='aa') {
        retarr = {myname:"myvalue"};
    }
    return retarr;
}

Reply via email to