sServerMethod set as POST but still use GET

sServerMethod set as POST but still use GET

mathiemathie Posts: 36Questions: 0Answers: 0
edited March 2012 in Bug reports
Is there any reason if I set it as POST but it still uses GET (see from Firefox "Web Console")? I use 1.9 from Microsoft/ASP CDN. This is the init call:

[code]
$(function() { $("#jDT1").dataTable({"oLanguage":{"sLengthMenu":gPerPage,"sSearch":"Filter:"},"bJQueryUI":true,"bAutoWidth":false,"bStateSave":true,"bSort":false,"sPaginationType":"full_numbers","sCookiePrefix":"jDataTable","sDom":gLayout,"bProcessing":true,"bServerSide":true,"sAjaxSource":"\/Tests\/dt.html","sServerMethod":"POST","fnServerData":fnServerDataCustom});});
[/code]

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    > "fnServerData":fnServerDataCustom

    You are using your own fnServerData function, so I guess the question is, does that use sServerMethod from the DataTables settings object - I presume not :-).

    Allan
  • mathiemathie Posts: 36Questions: 0Answers: 0
    That's exactly it! Thank you!!!

    (p/s: I donated, several times indeed, and will continue since Allan really improves DataTables on a daily basis)
  • mathiemathie Posts: 36Questions: 0Answers: 0
    Oh, and FYI, the reason I use a custom fnServerData is to submit an internal debug report in additional to the alert dialog. I think this might be a useful addition/customization to note:

    [code]$.post("dtDebug.php",{url:a,input:b,output:f.responseText});[/code]

    Thanks
  • mathiemathie Posts: 36Questions: 0Answers: 0
    Oh, another FYI, sServerMethod is only available in 1.9.0 on Microsoft CDN (1.8.2 does not have/use this param)

    http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/jquery.dataTables.min.js
    http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.8.2/jquery.dataTables.min.js
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    All good points - thanks very much. And yup, this parameter was introduced in 1.9.0. As you say - daily progress ;-). Thanks very much for your donations - hugely appreciated.

    Allan
This discussion has been closed.