DataTables warning: table id=filters-result-table - Ajax error. For more 
information about this error, please see http://datatables.net/tn/7





$('#input-search').keypress(function (e) {
        var key = e.which;
        if (key == 13)  // the enter key code
        {
            e.preventDefault();
            $(".btn-apply-filter").click()
        }
    });
    $('.btn-apply-filter').click(function (event) {
        let $from = $('#filter-form');
        let form_data = $("#filter-form").serializeArray();        

        var select_key 
        for (i=0; i<form_data.length;i++){                        
            if (form_data[i].name === 'select-key'){
                select_key = form_data[i].value
                
            }
            if (form_data[i].name === 'select-val'){
                if (select_key!=='-1' & form_data[i].value === ''){             
       
                    toastr.error('Invalid/Empty filter value','Optional filter 
fields')
                    return
                }
            }
        }

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b62cdffc-3f4c-45f7-bb25-08b7abada587n%40googlegroups.com.

Reply via email to