Hi ! I have problem with $.ajax. Console show me error : rate.php not found , but if i click on link it works. I use Xampp on local host. My script : <script> function rateThis(value,id,type) { $.ajax({ type: 'GET', data : {value : value,movie: id,type : type}, url: '/rate.php', success: function(data){ alert('ok'); } }); } </script> Code (markup):
Have you checked your root path of xampp installation. It may be setup to some sub folder. Also try giving the relative path by using ./ or ../ if rate.php is in upper folder in hierarchy, not the path which starts from slash. BTW, for server side scripts, paths starting with root path (starts with slash /) are the worst. For html / css it may be ok.
your script could not able to access rate.php try giving full path for example http://mydomain/myfolder/rate.php and see if it finds
May be your file does not exists or your given path is wrong. if your rate.php is in same folder as the ajax file try using url: 'rate.php',