I have the following code
$.ajax({
url: "../profile/companyAutocomplete.php",
type: "GET",
data: dataQuery,
dataType: "json",
success: function(responseData) {
companySelectHandler(responseData);
}
});
which i getting called in the production server without any issues. But when I used it in my local system, the ajax request is not made. I have tried in all the browsers but its still the same. What would be the causing the issue? I need to print the ajax error message for the same. How can i achieve that?
Thanks for your answers. It was not because of the relative URL reference.
I used the following function to figure out which error was causing the Ajax request to fail.
The error was a parse error which was getting generated as the browser was trying to print something else before returning the JSON. It was fixed by using ob_start and ob_end_clean right before outputting the JSON which clears the buffer by getting help from the following link "dataType: "json" won't work"