Loading ...
Sorry, an error occurred while loading the content.
 

empty dataTable using datasource in text mode, shows me error message instead of empty message

Expand Messages
  • gbarros
    var datasrc = new YAHOO.util.DataSource( ./data.html ); datasrc.responseType = YAHOO.util.DataSource.TYPE_TEXT; dtaTable = new
    Message 1 of 1 , Dec 4, 2007
      var datasrc = new YAHOO.util.DataSource('./data.html');
      datasrc.responseType = YAHOO.util.DataSource.TYPE_TEXT;
      dtaTable = new YAHOO.widget.DataTable('linksContainer', ColumnSet,
      datasrc, oConfigs);

      no matter what type of data I return, unless it have at least ONE rown
      with a valid number of datasrc.responseSchema.fieldDelim, i will get an
      error.


      If i send just an empty response i get datatable default behaviour for
      error in connection. "Data error." message.´╗┐ And more importantly to me,
      DataTable.initEvent will never get fired.

      If i send only a ´╗┐datasrc.responseSchema.recordDelim or wrong number of
      fieldDelim then i get a javascript error in datasource.js:57


      How do I work around this?
      Currently i'm using dataReturnEvent and if I have a response.error
      (which is triggered if an empty OK response is received) i presume an
      empty response. Will never know if an real error occurred.

      Thanks,
    Your message has been successfully submitted and would be delivered to recipients shortly.