Welcome Guest, Not a member yet? Register   Sign In
ajax request 404 error
#1

I am working on a simple DataTables page. The DataTable will get the data with an Ajax Call. My DataTables setup (javaScript) is below:

Code:
$("#tblReport").DataTable({
            dom: 'Bfrtip',
            buttons: [
                'copyHtml5',
                'excelHtml5',
                'pdfHtml5'
            ],
            ajax: {
                url: '/reports/ajaxopenwolist',
                type: 'POST'
            }
       
       
        }
        );

I have a controller class called Reports.php and all my other methods work fine. When I load the datatables, I get a 404 error. However, when I type the same address in my browser, I get the JSON data I expected. I have added the method to the Routes.php file as well.

Does anyone have any ideas?
Reply


Messages In This Thread
ajax request 404 error - by bazianm - 09-21-2022, 09:16 AM
RE: ajax request 404 error - by JustJohnQ - 09-21-2022, 01:15 PM
RE: ajax request 404 error - by superior - 09-22-2022, 02:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB