save ,update , delete a form


I have the next code:

var employees = new dhtmlXDataStore({
myDP = new dataProcessor("./employees.php");

var formData = [
{type: “settings”, position: “label-top”},
{type: “fieldset”, name: “mydata”, label: “Details”, inputWidth:230, list:[
{type: “block”, list:[
{type: “label”, offsetTop:8, label: “Sucursal”},
{type: “input”, name:“sucursal”, inputWidth:120, validate: “NotEmpty” },
{type: “label”, offsetTop:8, label: “Nombre”},
{type: “input”, name:“nombre”, inputWidth:120}
{type: “block”, list:[
{type: “label”, offsetTop:43, label: “Direccion”},
{type: “input”, inputWidth:160, name:“direccion”},
{type: “button”, offsetTop:8,name:“add”, value:“Adicionar”},
{type: “newcolumn”},
{type: “button”, offsetTop:8, name:“modificar”, value:“Modificar”}
{type: “block”, list:[
// {type: “button”, offsetTop:8, name:“add”, value:“add record”},
{type: “button”, name:“delete”, offsetTop:8, value:“delete record”}

    myForm = layout.cells("b").attachForm(formData);

myForm.attachEvent(“onButtonClick”, function(id){
if (id==‘add’){//;
else if (id==‘modificar’){; //saves the made changes
else if (id==‘delete’){ //deletes the selected row
var selectedItem = myGrid.getSelectedRowId();

but , in the action add , Error: ‘_dhx_proto_wait’ is null o not is object.
whats up?
thanks a lot

please help!!!

I’m having the same problem. I believe it has to do with the handler script on the server side, as I’m only having the problem on an ‘insert’ - updates are working fine. Please post what you find, and I’ll do the same.

Good luck,

Same problem here, if anyone have a solution please post.

Try to use the updated datastore.

Also in original sample form can be bind directly to DataStore (14 KB)