Ajax request returns 400 bad request — February 13, 2018

Ajax request returns 400 bad request

Try adding contentType and contentType in your ajax request.
For example:--
contentType: "application/json; charset=utf-8",
dataType: "json"
Advertisements
jQuery datatable add input to toolbar section — December 17, 2017
jquery Datatable table.columns is not a function —
jQuery remove empty element from an array — December 4, 2017
jQuery check and make sure that function exists — November 13, 2017
jQuery allow only digits in input — September 4, 2017

jQuery allow only digits in input

jQuery.fn.ForceNumericOnly =function()
{
    return this.each(function()
    {
        $(this).keydown(function(e)
        {
            var key = e.charCode || e.keyCode || 0;
            // allow backspace, tab, delete, enter, arrows, numbers and keypad numbers ONLY
            // home, end, period, and numpad decimal
            return (
                key == 8 || 
                key == 9 ||
                key == 13 ||
                key == 46 ||
                key == 110 ||
                key == 190 ||
                (key >= 35 && key = 48 && key = 96 && key <= 105));
        });
    });
};

$("#userphone").ForceNumericOnly();

jQuery Datatable fix header — July 11, 2017

jQuery Datatable fix header

need to add these two files

http://cdn.datatables.net/fixedheader/2.1.1/css/dataTables.fixedHeader.css
http://cdn.datatables.net/fixedheader/2.1.1/js/dataTables.fixedHeader.min.js

and this

var table = jQuery('#datatable').dataTable({});
new $.fn.dataTable.FixedHeader( table, {
    // alwaysCloneTop: true
    // "zTop": "2001"
    "offsetTop": 50
});

You can check more options here.