Getting an error message; Failed to load rescources: the server responded with a status of 500

Godwin

I am working creating an app and i notice that when i try to include ajax code in my work its not working...and this same code is working for the video tutorial am learning from it happened in two different video tutorials wen i get to anything relating to ajax.. and its quiet frustrating.. this i my code below.

<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="col-lg-10 col-md-10 col-sm-8 col-xs-6">
                    <div class="row">
                        <h3 class="panel-title">Book List</h3>
                    </div>
                </div>
                <div class="col-lg-2 col-md-2 col-sm-4 col-xs-6">
                    <div class="row" align="right">

                    </div>
                </div>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-12 table-responsive">
<table id="book-table" class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Book Title</th>
                                    <th>Book Price</th>
                                    <th>Book Author</th>
                                    <th>Rating</th>
                                    <th>Publisher</th>
                                </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
    $(document).ready(function(){ 
        $('#book-table').DataTable({
            "ajax":{
                url: "<?php echo site_url("books/books_page") ?>",
                type: 'GET'
            },
        });
    });
</script>

this is the error am getting wen i try to inspect it using google chrome developer tools

enter image description here

Saad.elzwawy

from console the url is wrong, put it as below:

            url: "<?php echo site_url("/books/books_page") ?>",

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

getting error message "Failed to load resource: the server responded with a status of 404 (Not Found)"

From Javascript

Failed to load resource: the server responded with a status of 500 (Internal Server Error) in Bind function

From Dev

Jquery ajax call wont access the controller: Failed to load resource: the server responded with a status of 500 (Internal Server Error)

From Dev

Failed to load resource: the server responded with a status of 500 (Internal Server Error) Azure MVC

From Dev

shinyapps.io- Failed to load resource: the server responded with a status of 500 (Internal Server Error)

From Dev

EJS: Failed to load resource: the server responded with a status of 500 (Internal Server Error) using loop

From Dev

PHPmailer: Failed to load resource: the server responded with a status of 500 (Internal Server Error)

From Dev

Laravel Chained Select Failed to load resource: the server responded with a status of 500

From Dev

Failed to load resource: the server responded with a status of 404 () deployed react site made with vite on netlify and getting this error

From Dev

I am getting a 'Failed to load resource: the server responded with a status of 404 ()' error for my audio files in my project

From Dev

Failed to load resource: the server responded with a status of 500 (Internal Server Error) this error occurs when I try to upload an image

From Dev

Failed to load resource: the server responded with a status of 500 (Internal Server Error) while returning image in base64 format from controller

From Dev

heroku /api/comments:1 Failed to load resource: the server responded with a status of 500

From Dev

Failed to load resource: the server responded with a status of 500 (using signal function...)

From Dev

Failed to load resource: the server responded with a status of 500 () | Oracle & ASP.NET Core MVC 3.1

From Dev

Calling function in API retrieves Failed to load resource: the server responded with a status of 500 ()

From Dev

Getting 413 "Failed to load resource: the server responded with a status of 413 ()" while uploading file to Dropbox

From Dev

failed to load resource: the server response with a status 500 (internal server error)

From Dev

Django and ReactJS integration: "Failed to load resource: the server responded with a status of 404 (Not Found)" error

From Dev

calling .net core method from angular gives error: failed to load resource: the server responded with a status of 404 ()

From Dev

Failed to load resource: the server responded with a status of 400 () error: Angular asp.net core 5 api

From Javascript

add js to shiny raise error: Failed to load resource: the server responded with a status of 404 (Not Found)

From Dev

Error : Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

From Dev

Kendo UI remove events in grid is showing error "Failed to load resource: the server responded with a status of 400 ()"

From Dev

Failed to load resource: the server responded with a status of 404 error after deploying project

From Dev

How to fix error code "Failed to load resource: the server responded with a status of 403 (Forbidden)" in node.js

From Dev

How to fix "Failed to load resource: the server responded with a status of 400 ()" API fetch error

From Dev

Azure Bot Returning "Failed to load resource: the server responded with a status of 502 (Bad Gateway)" error

From Dev

D3.js Error: Failed to load resource: the server responded with a status of 406 (Not Acceptable)

Related Related

  1. 1

    getting error message "Failed to load resource: the server responded with a status of 404 (Not Found)"

  2. 2

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) in Bind function

  3. 3

    Jquery ajax call wont access the controller: Failed to load resource: the server responded with a status of 500 (Internal Server Error)

  4. 4

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) Azure MVC

  5. 5

    shinyapps.io- Failed to load resource: the server responded with a status of 500 (Internal Server Error)

  6. 6

    EJS: Failed to load resource: the server responded with a status of 500 (Internal Server Error) using loop

  7. 7

    PHPmailer: Failed to load resource: the server responded with a status of 500 (Internal Server Error)

  8. 8

    Laravel Chained Select Failed to load resource: the server responded with a status of 500

  9. 9

    Failed to load resource: the server responded with a status of 404 () deployed react site made with vite on netlify and getting this error

  10. 10

    I am getting a 'Failed to load resource: the server responded with a status of 404 ()' error for my audio files in my project

  11. 11

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) this error occurs when I try to upload an image

  12. 12

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) while returning image in base64 format from controller

  13. 13

    heroku /api/comments:1 Failed to load resource: the server responded with a status of 500

  14. 14

    Failed to load resource: the server responded with a status of 500 (using signal function...)

  15. 15

    Failed to load resource: the server responded with a status of 500 () | Oracle & ASP.NET Core MVC 3.1

  16. 16

    Calling function in API retrieves Failed to load resource: the server responded with a status of 500 ()

  17. 17

    Getting 413 "Failed to load resource: the server responded with a status of 413 ()" while uploading file to Dropbox

  18. 18

    failed to load resource: the server response with a status 500 (internal server error)

  19. 19

    Django and ReactJS integration: "Failed to load resource: the server responded with a status of 404 (Not Found)" error

  20. 20

    calling .net core method from angular gives error: failed to load resource: the server responded with a status of 404 ()

  21. 21

    Failed to load resource: the server responded with a status of 400 () error: Angular asp.net core 5 api

  22. 22

    add js to shiny raise error: Failed to load resource: the server responded with a status of 404 (Not Found)

  23. 23

    Error : Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

  24. 24

    Kendo UI remove events in grid is showing error "Failed to load resource: the server responded with a status of 400 ()"

  25. 25

    Failed to load resource: the server responded with a status of 404 error after deploying project

  26. 26

    How to fix error code "Failed to load resource: the server responded with a status of 403 (Forbidden)" in node.js

  27. 27

    How to fix "Failed to load resource: the server responded with a status of 400 ()" API fetch error

  28. 28

    Azure Bot Returning "Failed to load resource: the server responded with a status of 502 (Bad Gateway)" error

  29. 29

    D3.js Error: Failed to load resource: the server responded with a status of 406 (Not Acceptable)

HotTag

Archive