How ca i determine when the data has been recived???

I need to find out when the Active.Text.Table has finished loading the data into the grid ?(I recive the data asynchronous.)
I need a answer fast
April 8,
You can plug your code into the table.response method.

var table = new Active.Text.Table;
var defaultResponse = table.response;

table.response = function(data){
defaultResponse.call(table, data);
// do your stuff here


Actually, the data is not loaded into the grid. The model just provides an interface to retrieve the data when needed.
Alex (ActiveWidgets)
April 8,
So the place with "//do your stuff here."
How would you code, stop here until the table is finished loading.? I'm loading two XML tables, and I need the first one loaded before the seconds one can even start... Is that how I would do it?
October 4,
The data model sends a request to the server when you call table.request() method. Nothing happens until the response comes back and at this time the data model calls table.response() method. If you insert your code into the response method it will be called after the data had arrived. At this point you can set up your second table and call the table2.request().
Alex (ActiveWidgets)
October 4,
Excellent. All I did was say to load my dropdown boxes after the data for the dropdown boxes has loaded. Its all starting to make sense now.

    var tableOrder = new Active.XML.Table;
    var tableReason = new Active.XML.Table;
    var tableComp = new Active.XML.Table;



    var _response = tableOrder.response;
    tableOrder.response = function(xml)
        _response.call(this, xml);

        for (i = 0; i <=tableOrder.getCount(); i++){
            dropBox1.addOption(tableOrder.getText(i, 1), tableOrder.getText(i, 0), 9);

        for (i = 0; i <=tableReason.getCount(); i++){
            dropBox2.addOption(tableReason.getText(i, 1), tableReason.getText(i, 0), 10);

        for (i = 0; i <=tableComp.getCount(); i++){
            dropBox3.addOption(tableComp.getText(i, 1), tableComp.getText(i, 0), 11);


October 5,

This topic is archived.

See also:

Back to support forum