Ajax - 500 Internal Server Error

后端 未结 8 1119
难免孤独
难免孤独 2020-11-30 07:22

I am trying to learn AJAX for this project at work. I have a site that loads medications that a patient is taking.

I call this AJAX function up recursively so that i

8条回答
  •  遥遥无期
    2020-11-30 08:13

    The 500 (internal server error) means something went wrong on the server's side. It could be several things, but I would start by verifying that the URL and parameters are correct. Also, make sure that whatever handles the request is expecting the request as a GET and not a POST.

    One useful way to learn more about what's going on is to use a tool like Fiddler which will let you watch all HTTP requests and responses so you can see exactly what you're sending and the server is responding with.

    If you don't have a compelling reason to write your own Ajax code, you would be far better off using a library that handles the Ajax interactions for you. jQuery is one option.

提交回复
热议问题