Post 404 not found, Jquery error
-
Having some troubles. I have a custom plugin. In my dashboard, I select the plugin admin page. I do a search for a person, and it should load that person for me to edit. However, I am just getting a loading spinner. No results pop up. Chrome Development tools says I am getting an error:
POST /loadpatient.php 404 (Not Found)
I click the down arrow to get more info on the error and it shows:
send jquery.min.js:2197
b.extend.ajax jquery.min.js:2062
(anonymous function) script.js:44
b.event.dispatch jquery.min.js:705
v.handleI click the one that says ‘anonymous function’ and it shows the part of the code from the php file:
$j(“#loadpatient-form”).submit(function() {
$j(“#loading_spinner”).show();
var str = $j(this).serialize();
$j.ajax({
type: “POST”,
url: plugin_location + ‘loadpatient.php’,
data: str,
success: function(msg) {
$j(“#note”).ajaxComplete(function(event, request, settings)
{
$j(“#loading_spinner”).hide();
$j(this).html(msg);$j(“#editpatient-form”).submit(function() {
$j(“#loading_spinner”).show();
var str = $j(this).serialize();
$j.ajax({
type: “POST”,
url: plugin_location + ‘editpatient.php’,
data: str,
success: function(msg) {
$j(“#note”).ajaxComplete(function(event, request, settings)
{
$j(“#loading_spinner”).hide();
$j(this).html(msg);
});
}
});
return false;
});The highlighted part when I click the ‘anonymous function’ script is just
$j.ajax({
Please help me figure out the error so that I can pull up and edit the people in my database!
- The topic ‘Post 404 not found, Jquery error’ is closed to new replies.