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

datatable in tabview

Expand Messages
  • mishoboss
    Hi, i m trying to put a JS created datatable in tabview. Here is some ... tab.addListener( click , function(e) {
    Message 1 of 2 , Oct 1, 2007
    View Source
    • 0 Attachment
      Hi, i'm trying to put a JS created datatable in tabview. Here is some
      code:

      -----------------------------------------------------------
      tab.addListener('click', function(e) {
      getUrl('ajax.php?getManageAccs',null,loadDataTable,function(){
      alert("error");
      });
      });




      // loadDataTable
      loadDataTable = function(xhr){
      var err = checkResultForErr(xhr);
      if (err){
      alert("error");

      return;
      }

      var xmlDoc = xhr.responseXML;
      var myColumnDefs = [
      {key:"id", label:"Id", sortable:true,
      formatter:this.formatUrl},
      {key:"name"}
      ];
      this.myDataSource = new YAHOO.util.DataSource(xmlDoc);
      this.myDataSource.responseType =
      YAHOO.util.DataSource.TYPE_XML;
      this.myDataSource.responseSchema = {
      resultNode: "share",
      fields: ["id","name"]
      };

      this.myDataTable = new
      YAHOO.widget.DataTable("localxml", myColumnDefs, this.myDataSource);


      } //end loadDataTable



      ------------------------------------------

      This fully works when the "localxml" DIV is outside the tabview, but
      when "localxml" DIV is in some TAB it's not showing.

      Any help would be nice :)
    • mishoboss
      Hi, i m trying to put a JS created datatable in tabview. Here is some ... tab.addListener( click , function(e) {
      Message 2 of 2 , Oct 1, 2007
      View Source
      • 0 Attachment
        Hi, i'm trying to put a JS created datatable in tabview. Here is some
        code:

        -----------------------------------------------------------
        tab.addListener('click', function(e) {
        getUrl('ajax.php?getManageAccs',null,loadDataTable,function(){
        alert("error");
        });
        });




        // loadDataTable
        loadDataTable = function(xhr){
        var err = checkResultForErr(xhr);
        if (err){
        alert("error");

        return;
        }

        var xmlDoc = xhr.responseXML;
        var myColumnDefs = [
        {key:"id", label:"Id", sortable:true,
        formatter:this.formatUrl},
        {key:"name"}
        ];
        this.myDataSource = new YAHOO.util.DataSource(xmlDoc);
        this.myDataSource.responseType =
        YAHOO.util.DataSource.TYPE_XML;
        this.myDataSource.responseSchema = {
        resultNode: "share",
        fields: ["id","name"]
        };

        this.myDataTable = new
        YAHOO.widget.DataTable("localxml", myColumnDefs, this.myDataSource);


        } //end loadDataTable



        ------------------------------------------

        This fully works when the "localxml" DIV is outside the tabview, but
        when "localxml" DIV is in some TAB it's not showing.

        Any help would be nice :)
      Your message has been successfully submitted and would be delivered to recipients shortly.