I have the following issue in laravel 5:
In my js file I have written the code
$.ajax({
method: 'GET',
dataType: 'json',
contentType: "application/json",
url: '/ads/getcategories',
error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus, errorThrown, jqXHR);
},
success: function(response, textStatus, jqXHR) {
_this.renderCategories(response);
}
});
In my laravel 5 route I file have written:
Route::get('ads/getcategories', 'AdsController@getCategories');
And finaly in my laravel 5 controller file the method I have written
public function getCategories()
{
return '{}';
}
I just want to return empty json object. This works great on webkit browsers - chrome and opera but on mozilla and IE11 doesn't work. I wrote the console.log for ajax error and the messages are: IE11 - parseerror Mozilla - error
Just that. I tried the ajax request with mozilla add-ons for rest requests and the results are ok, but when I tried to get the request in the page in the browser the request returs error.
SOLVED: Thanks to IE11 response
Mozilla still returns nothing except just error.
Adblock blocks the get request but how to do the ajax for the all users which are using adblock for mozilla and IE?
SOLVED: Thanks to IE11 response
Mozilla still returns nothing except just error.
Adblock blocks the get request but how to do the ajax for the all users which are using adblock for mozilla and IE?