MooTools request url returns 404 errorpage
I am having trouble because my MooTools AJAX request doesn't find my PHP script URL request. First I have an index.php which loads in ControllerList.php (List files and delete each one), then in that script, I have this MooTools script for calling controllerDelete.
There is the problem because It says:
404: The requested URL /Files/ControladorDelete.php was not found on this server.
This is the structure of my project:
http://imageshack.us/photo/my-images/717/imagen1nvj.png/
This is my MooTools scri开发者_开发技巧pt:
window.addEvent('domready', function() {
$$('a.div').addEvent('click', function(e) {
e.stop();
var id_file = this.get('id');
var new = id_file.split('#');
var DeleteFile = new Request({
method: 'POST',
url: 'ControllerDelete.php?id_file='+new[1]+'&name='+new[0], ERROR
onRequest: function() {},
onSuccess: function() {
},
onFailure: function(){alert('Error!');}
}).send();
});
});
The request keeps giving me error. Thanks for your help
I already changed to URL: Controler/ControllerDelete.php but Its the same and I don't know how to fix it.
One look at your folder tree tells me that you need to form your URL like this:
url: 'Source%20Files/Controller/ControllerDelete.php?id_file='+new[1]+'&name='+new[0],
To fix your error.
精彩评论