I have a problem with one of my AJAX requests. It all worked before, then I moved a few files in folders and it must have broken something, but I couldnβt figure out what might be wrong in my path.
What's happening
It seems that the AJAX request is being ignored, nothing is happening on the console or on the network tab, responseText is "", and I put a breakpoint on the first line of PHP that never hits. It goes straight from $.ajax to the first line in my callback. Also, when this PHP code gets called directly to a page or cron, it works fine.
I have a very similar call later to another file in the same folder, which works fine.
What i tried
As mentioned earlier, I looked at responseText, console output, network tab and breakpoints in my PHP (which were never reached), and I looked at Google and stackoverflow. If I intentionally change the name to a nonexistent file, I quickly get an error message in the console.
Code below
$.ajax({ type: "POST", url: "PHP/myFile.php", data: '', success: function () {
Any ideas?
Here is the code, later in the file, which (successfully) captures the code from the file in the same folder.
$.ajax({ type: "GET", cache: false, url: "PHP/myOtherFile.php", dataType: 'json', success: function (data) {
Pretty simple AJAX calls, not sure what is going on: /