Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ligf on Oct 17, 2009 08:07
open dhtmlx forum
Call method sendData three times in a button onclick, only once was down

I spent three days had not solve this problem, pls help me, thanks all,,,,,,,

I have three dhtmlxgrid in a pege. Only the last one requet was down when I sent data from the method of sendData()
example:

g1 = new dhtmlXGridObject("grid1");
g1.setColumnIds(.....);
g1.setHeader(......);
pd1 = new dataProcessor(url);
pd1.enableDataNames(true)
pd1.setUpdateMode("off");
pd1.init(g1);

g2 = new dhtmlXGridObject("grid2");
g2.setColumnIds(.....);
g2.setHeader(......);
pd2 = new dataProcessor(url);
pd2.enableDataNames(true)
pd2.setUpdateMode("off");
pd2.init(g2);

g3 = new dhtmlXGridObject("grid3");
g3.setColumnIds(.....);
g3.setHeader(......);
pd3 = new dataProcessor(url);
pd3.enableDataNames(true)
pd3.setUpdateMode("off");
pd3.init(g3);

// submit data
button1.onclick = function submits(){
pd1.sendData();
pd1.sendData();
pd1.sendData();
}




Answer posted by dhxSupport on Oct 19, 2009 01:45
You have 3 instance of DataProcessor on your page. Probably you should use:

button1.onclick = function submits(){
pd1.sendData();
pd2.sendData(); 
pd3.sendData(); 
}
Answer posted by ligf on Oct 19, 2009 02:13

sorry, I was wrong.  I was use like following,

button1.onclick = function submits(){
    pd1.sendData();
    pd2.sendData();
    pd3.sendData();
}

but only the last one requet was down when I sent data from the method of sendData.


 

 

 

Answer posted by dhxSupport on Oct 19, 2009 02:35
Please try to attach debug version of dhtmlxdataprocesso.js file. So you will be able to check what responced does DataProcessor send to the server side. 
Please find more information here http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxdataprocessor:debug_mode