sAjaxSource problem

sAjaxSource problem

searaseara Posts: 2Questions: 0Answers: 0
edited February 2012 in General
Hello guys,

I am having a strange issue when using the sAjaxSource property.

I have a old code being in use since 2010 without problem but for some reason its started to dont download the Json file anymore.

I always get 500 error, and analysing it with fire bug I noticed that at the end of my call where is the file (the datatable) inserted a _ 121221121212 for instance and its generates my error when parsing to download the file.

Here is the piece of code that I use to call it.



var $j = jQuery.noConflict();
$j(''#tabela'').dataTable( {
"bJQueryUI": true,
"bProcessing":true,
"sAjaxSource":''https://'||owa_util.get_cgi_env('server_name')||':4443/entrada/sistema/mptranspdoc.pcmontadownload?p_arquivovc=json_source1.txt&p_nmdirectory=ARQIMPORTADO'',
"bPaginate": true,
"bLengthChange": true,
"bFilter": false,
"bSort": true,
"bInfo": true,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"oLanguage": {
"sProcessing": "",
"sLengthMenu": "Registros por página: _MENU_",
"sZeroRecords": "Não Foram encontrados registros para esta pesquisa",
"sInfo": "Registros de _START_ a _END_ de _TOTAL_ registros.",
"sInfoEmpty": "0 registros",
"sInfoFiltered": "encontrados a partir de _MAX_ entradas",
"sInfoPostFix": "",
"sSearch": "Pesquisar:",
"sUrl": "",
"oPaginate": {
"sFirst": "Primeira",
"sPrevious": " Anterior",
"sNext": "Próxima",
"sLast": "Última"
}
}
});


and here is the return error string that i got at firebug

https://scooby.utfpr.edu.br:4443/entrada/sistema/mptranspdoc.pcmontadownload?p_arquivovc=json_source1.txt&p_nmdirectory=ARQIMPORTADO&_=1328810876749

Note the _=1328810876749 that is not at the original call at the code.

Can you assist me to understand why is it happening and how to fix it?



Best Regards

Ricardo.

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    500 error is an internal server error. It likely isn't anything in your client-side code (although "dodgy" parameters could cause it, but the script should be able to cope with that). Its a script issue on the server-side - I'd suggest you check the server error logs to see what is happening.

    Allan
  • searaseara Posts: 2Questions: 0Answers: 0
    Thanks Allan, but I already have checked, note the _=1328810876749 parameter, it is not there when i call it, but somehow it is bem placed ... and that is it that is generating the 500 error.


    I am trying to figure out how and where it is been placed as you can see. For me is something related to datatables or JQuery because the original code does not have it as you could see.

    Can you explain a bit how the calls are processed by Datatables? So I can find out where its might be placed the _=1328810876749 at the URL.
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    It looks like the jQuery anti-cache parameter to me: http://api.jquery.com/jQuery.ajax/ (the "cache" parameter).

    Allan
This discussion has been closed.