data table with asp and xsl

data table with asp and xsl

rhafikorhafiko Posts: 2Questions: 0Answers: 0
edited May 2009 in General
hi Allan,

im having problem using asp and xsl.

the table just dont appears with datatables format, and raise an error like this "sData.length is undefined
[Break on this error] for ( i=0 ; i

Replies

  • allanallan Posts: 61,669Questions: 1Answers: 10,096 Site admin
    Hi Najib,

    When you say you are using xsl - in what way exactly are you using it? Are you outputting your table as HTML and then having DataTables run on top of that or are you using a json data source of some sort? The error you indicate would suggest that the data isn't present where DataTables expects it to be - but I'm not sure how that could happen :-)

    Do you have a link you could post with an example?

    Thanks
    Allan
  • rhafikorhafiko Posts: 2Questions: 0Answers: 0
    edited May 2009
    Allan,

    im using asp to call xsl file like this.

    XML xmlMain, Server.MapPath("pageDetail.xsl")

    in this asp page i've declared the initialization tag like this:
    $(document).ready(function() {
    $('#myTableID').dataTable({
    "bProcessing": true,
    "bServerSide": true
    });
    } );

    the table is generated in the xsl file.

    sorry, but i dont have how to put a on-line example.

    thanks a lot.
  • allanallan Posts: 61,669Questions: 1Answers: 10,096 Site admin
    I'm not an ASP person, so I'm not sure how much I'll be able to help, but it looks like there is a little misunderstanding somewhere. If you are using server-side processing (bServerSide) then you must give the sAjaxSource parameter as an address where DataTables can get it's data ( http://datatables.net/1.5-beta/examples/data_sources/server_side.html - use Firebug, or something else, to see the server response), and the response must be well formatted json.

    DataTables will not pull information out of an xsl file for you! What you need to do is get it out and format it into an HTML table, or a json data array.

    Does that help at all?

    Allan
This discussion has been closed.