javascript table - update on data request

Posted by flyingcrab on Stack Overflow See other posts from Stack Overflow or by flyingcrab
Published on 2010-06-08T10:32:39Z Indexed on 2010/06/08 10:42 UTC
Read the original article Hit count: 271

Filed under:
|

Hi,

I am trying to update a table based on a json request. The first update / draw works fine - but any subsequent changes to the variables (the start and end date) do not show up - even though the json pulled from the server seems to be correct (according to firebug).

AFAIK the code below should re-initialize everything - no sure what is going on (I'm using the Google vizulization api)?

function handleQueryResponse(response) {

  if (response.isError()) {
    //alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
    return;
  }
  visualization = new google.visualization.Table(document.getElementById('visualization'));
  visualization.draw(response.getDataTable(), null);
}

One more thing: I'm working on a page that displays textbased tables and currently trying to decide between the google table (viz api) and a jQuery alternative I came across jqGrid any good ones I am missing?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about AJAX