javascript - POST /path/to/file/myfile.php 404 ( Not Found ) jQuery error in console log -


i'm having bit of issue jquery code. runs ajax request through jquery.post run .php file. after results displayed in div. problem having results not being displayed, .php file being executed values being updated when refresh page.

in console following error.

post http://domain.com/path/to/my/file/myfile.php 404 (not found) jquery.js?ver=1.8.3:2 send jquery.js?ver=1.8.3:2 v.extend.ajax jquery.js?ver=1.8.3:2 v.(anonymous function) jquery.js?ver=1.8.3:2 (anonymous function) domain.com/url/function/here/:2723 v.event.dispatch jquery.js?ver=1.8.3:2 o.handle.u jquery.js?ver=1.8.3:2 

here jquery code

                    jquery('.wantedstatus').on('click', function(event)                     {                             var anime_id = <?php echo $anime_id; ?>;                             var anime_list_entry_id = <?php echo $anime_list_entry_id; ?>;                             var wantedstatus = jquery(this).text();                                  jquery.post("/path/to/my/file/myfile.php", {firstparam : anime_id, secondparam : anime_list_entry_id, thirdparam : wantedstatus}, function(data) {                                     //this response data serv                                 console.log(data);                                 jquery('#anime_list_update').html(data);                              });                                 return false;                     }); 

and here myfile.php code...

<?php  require('/home2/phanime/public_html/wp-blog-header.php');  $anime_id = $_post['firstparam']; $anime_list_entry_id = $_post['secondparam']; $wantedstatus = $_post['thirdparam'];  $total_episodes = get_post_meta($anime_id, 'anime_total_episodes', true); $episodes_seen = get_post_meta($anime_list_entry_id, 'episodes_seen_list_entry', true); $score = get_post_meta($anime_list_entry_id, 'score_anime_list_entry', true);  update_post_meta($anime_list_entry_id, 'status_list_entry', $wantedstatus);  echo $status = get_post_meta($anime_list_entry_id, 'status_list_entry', true);  ?>  <?php get_entry_anime_list_text($status, $score, $episodes_seen); ?> 

the ending function get_entry_anime_list_text(params) suppose outputted. however, nothing being outputted , on top of getting error in console.

i've tried commenting out get_entry_anime_list_text() function error still exists.

does have idea why error popping up?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -