Sending all the pages with fields in the rows [My simple solution]
Sending all the pages with fields in the rows [My simple solution]
ProfeRonald
Posts: 2Questions: 0Answers: 0
This is my simple solution
// MUST CHANGE BUTTON TYPE FROM "submit" TO "button"
$(document).ready(function() {
$(document).on('click', '#IdButtonSubmit', function () {
//$("#YourIdDataTable").css({display:'none'}); // if you don't want to show all the pages //
$("select[name=YourIdDataTable_length]").val("-1"); // change the selected value to "All"
$("select[name=YourIdDataTable_length]").change(); // Datatable detects the change
$('#IdButtonSubmit').focus(); // focus submit button
$("#IdForm").submit(); // submit the form
});
});
You need to add options to avoid resize the page.
This discussion has been closed.
Replies
cool! thanks for sharing!
if you want to prevent the page resizing. Add another div on top of your
"DivTableContainer":
1-
2 -
var noresize = $('#YourIdDataTable').parents('.dataTables_wrapper').clone(true, true);
noresize.appendTo('#cloneTable');
$("#IdButtonSubmit").prop('disabled', true);
Full Code:
// MUST CHANGE BUTTON TYPE FROM "submit" TO "button"