Problem with ajax

Problem with ajax

insectainsecta Posts: 2Questions: 0Answers: 0
edited April 2012 in DataTables 1.9
Hi,
I'm trying to integrate datatables in Oracle Portal, but I'm having one problem.
I have a very large table, I can't load it in one time, because it's several mb. I try to user serverside option, but I'm having a problem. In oracle portal every page that I create (enclosed the JSON answer) contains a comment at the end of the text.
It's like this:
[code]
{ "aaData": [
["Trident","Internet Explorer 4.0","Win 95+","4","X"],
.............
["Misc","IE Mobile","Windows Mobile 6","-","C"],
["Misc","PSP browser","PSP","-","C"],
["Other browsers","All others","-","-","U"]
] }
<!-- show footer template = 7483865244 -->
[/code]

I can't remove in any way from the text that comment. Is there a way to use this page as datasource? the result is obiouvsly no validating JSON, but I can't solve in any other way.
Thank You

Replies

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    What you could do is override the DataTa bles Ajax call with fnServerData and make your own Ajax request. In the 'success' handler for your Ajax get, you could do some string processing to remove the comment and then parse the remaining text as JSON and pass that to the DataTables draw callback.

    Allan
  • insectainsecta Posts: 2Questions: 0Answers: 0
    thanks ;-) problem solved
  • drchanixdrchanix Posts: 20Questions: 0Answers: 0
    Hi,
    Are you getting records from a database and displaying them in a datatable? If so, can you give me a sample code because I have the same problem too.
    I need to pull records from a database and display them in a datatable.
    Thanks.
  • drchanixdrchanix Posts: 20Questions: 0Answers: 0
    This is solved.
This discussion has been closed.