"next" button only works once [solved]
"next" button only works once [solved]
Hello,
i have jquery 1.5.2, jquery-ui 1.8.13 and dataTables 1.7.6
i don't know what happened but the "next" button only works once, all the other buttons work well, however i can only click it once and it takes me page 2, then i click it and nothing happens, no javascript errors in the console
the number for pages work, so i can go to page 3,4... by cliking on the numbers
i have no idea where to put breakpoint in firebug
here is my javascript
[code]
<!--
var oTable;
$(document).ready(function() {
...
oTable = $('#visualizzazione').dataTable(
{
"oLanguage": {
"sUrl": "/lang/dataTables-it_IT.txt"
},
//"bStateSave": true,
"aoColumns": [
{ "sName": "controller", "sWidth": "40%"},
{ "sName": "action", "sWidth": "40%"},
{ "sName": "id", "sWidth": "20%", "bSortable": false, "bSearchable" :false } ],
bAutoWidth:false,
"aLengthMenu": [[5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "Tutti"]],
"iDisplayLength" : "25",
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/"+controller_name+"/ajax/",
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
...
return nRow;
},
"fnInitComplete": function(){this.fnSetFilteringDelay();}//this is callback function
});
/* Add a click handler to the rows - this could be used as a callback */
$("#visualizzazione tbody").click(function(event) {
$(oTable.fnSettings().aoData).each(function (){
$(this.nTr).removeClass('row_selected');
});
$(event.target.parentNode).addClass('row_selected');
if ($(event.target).is('td') ) {//fix per il bug se fa click su un link, non fare niente
var id_riga = event.target.parentNode.lastChild.lastChild.innerHTML;//contenuto del hidden div
//event.target.parentNode.parentNode.lastChild.lastChild.innerHTML
window.location.href = "/"+controller_name+"/visualizza/id/"+ id_riga;
}
});
});
-->
[/code]
i have jquery 1.5.2, jquery-ui 1.8.13 and dataTables 1.7.6
i don't know what happened but the "next" button only works once, all the other buttons work well, however i can only click it once and it takes me page 2, then i click it and nothing happens, no javascript errors in the console
the number for pages work, so i can go to page 3,4... by cliking on the numbers
i have no idea where to put breakpoint in firebug
here is my javascript
[code]
<!--
var oTable;
$(document).ready(function() {
...
oTable = $('#visualizzazione').dataTable(
{
"oLanguage": {
"sUrl": "/lang/dataTables-it_IT.txt"
},
//"bStateSave": true,
"aoColumns": [
{ "sName": "controller", "sWidth": "40%"},
{ "sName": "action", "sWidth": "40%"},
{ "sName": "id", "sWidth": "20%", "bSortable": false, "bSearchable" :false } ],
bAutoWidth:false,
"aLengthMenu": [[5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "Tutti"]],
"iDisplayLength" : "25",
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/"+controller_name+"/ajax/",
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
...
return nRow;
},
"fnInitComplete": function(){this.fnSetFilteringDelay();}//this is callback function
});
/* Add a click handler to the rows - this could be used as a callback */
$("#visualizzazione tbody").click(function(event) {
$(oTable.fnSettings().aoData).each(function (){
$(this.nTr).removeClass('row_selected');
});
$(event.target.parentNode).addClass('row_selected');
if ($(event.target).is('td') ) {//fix per il bug se fa click su un link, non fare niente
var id_riga = event.target.parentNode.lastChild.lastChild.innerHTML;//contenuto del hidden div
//event.target.parentNode.parentNode.lastChild.lastChild.innerHTML
window.location.href = "/"+controller_name+"/visualizza/id/"+ id_riga;
}
});
});
-->
[/code]
This discussion has been closed.
Replies