Ajax with jQuery works in Firefox and gets 404 error in Chrome -
i have ajax request:
$.ajax({ datatype: 'json', error: function(result) { alert('error: ' + result.status); }, type: 'get', data: "", success: function(data) { //do stuff }, url: 'info/' + hash + '.json' });
and while in firefox works great, in chrome 404 error, how can fix work in chrome too?
try use full url-
url: 'http://yoursite.com/yourdirectorys/info/' + hash + '.json
or none relative url-
url: '/yourdirectorys/info/' + hash + '.json
Comments
Post a Comment