Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Anya on Mar 29, 2009 11:51
open dhtmlx forum
DataProcessor

My code is the following:

function InitCafedrasGrid(){
             grid = new dhtmlXGridObject('grid_container');
                grid.setImagePath("css/images/");
                grid.setHeader("Назва кафедри, ПІБ керівника");
                grid.setColumnIds("cafedra,zav_cafedra");
                grid.setInitWidths("200,200");
                grid.setColAlign("left,right");
                grid.setSkin("light");
                grid.setColSorting("str,str");
                grid.setColTypes("ed,ed");
         //grid.setColumnColor("white,white")
                grid.enableDragAndDrop(true);                 
                grid.attachHeader("#text_filter,");
                grid.init();
                grid.loadXML("db/dataprocessor/get.php?object=cafedras");    
                
                dhxDataProcessor = new dataProcessor("db/dataprocessor/update.php");
                
                dhxDataProcessor.setTransactionMode("POST");
                dhxDataProcessor.enableDataNames(true);
                dhxDataProcessor.enableDebug(true);
                dhxDataProcessor.init(grid);
                dhxDataProcessor.setOnAfterUpdate(function(){
                alert("OnAfterUpdate");
                });
            
    }


update.php

<?php

print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");

print("<!-- response xml -->\n");
print("<data>\n\t");
print("<action type='update' sid='".$_POST["gr_id"]."' tid='".$_POST["gr_id"]."'/>");
print("</data>");
?>


FireFox shows the following error:
dhtmlxEventable is not defined...

The message :
alert("OnAfterUpdate");
doesn't appear.

What am I doing wrong? Please, help...
Thank's...
Answer posted by Alex (support) on Mar 30, 2009 05:27

Hello, 

Please, be sure that all grid and dataprocessor libraries are from the same version. 

The problem looks like you use the old version of dhtmlxcommon.js - we have attached the latest one.

Attachments (1)
Answer posted by an4ous on Apr 01, 2009 09:19
Thank you... That was the reason of the problem.