Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (typeof aTable=='undefined'){
- aTable = $("#unfinish").dataTable({
- "bRetrieve" : true,
- "bServerSide": true,
- "bProcessing": true,
- "sAjaxSource": 'show_unfinish.php',
- "bAutoWidth" : true,
- "fnServerData": function (sSource,aoData,fnCallback){
- aoData.push({"name":"date","value":$("#datepicker").val()});
- aoData.push({"name":"line","value":$("#line").val()});
- aoData.push({"name":"model","value":$("#model").val()});
- aoData.push({"name":"lotno","value":$("#lotno").val()});
- aoData.push({"name":"range","value":$("#range").val()});
- aoData.push({"name":"error","value":$("#error").val()});
- aoData.push({"name":"pic","value":$("#pic").val()});
- $.ajax({
- "dataType":'json',
- "type":'POST',
- "url":sSource,
- "data":aoData,
- "success":function(json){
- fnCallback(json);
- }
- });
- },
- "aaSorting" : [[1,"desc"]],
- "aoColumns" : [
- /*Date*/ null,
- /*Line*/ null,
- /*Model*/null,
- /*Lotno*/null,
- /*Range*/null,
- /*Error*/null,
- /*PIC*/null
- ]
- });
- }else{
- aTable.fnDraw();
- }
- //for another table setup
- $("tfoot input").keyup( function () {
- /* Filter on the column (the index) of this element */
- oTable.fnFilter( this.value, $("tfoot input").index(this) );
- });
- /*
- * Support functions to provide a little bit of 'user friendlyness' to the textboxes in
- * the footer
- */
- $("tfoot input").each( function (i) {
- asInitVals[i] = this.value;
- });
- $("tfoot input").focus( function () {
- if ( this.className == "search_init" )
- {
- this.className = "";
- this.value = "";
- }
- });
- $("tfoot input").blur( function (i) {
- if ( this.value == "" )
- {
- this.className = "search_init";
- this.value = asInitVals[$("tfoot input").index(this)];
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement