0

An example:

this is the site I'm trying to get the HTML:

https://stackoverflow.com/questions/2294493/how-to-get-the-position-of-a-character-in-python

and the AJAX call

$.ajax({
        url: href,
        type: "get", //send it through get method
        success: function(response) {
                var htmlElem = $($.parseHTML(response));
                console.log({response})
         },
         error: function(xhr) {
                //Do Something to handle error
         }
        })

the response is empty ("") all the time, can someone know why? and how to fix it?

EDIT:

Loading cross-domain endpoint with jQuery AJAX

this is not fixinig the issue

Dkova
  • 1,087
  • 4
  • 16
  • 28
  • Possible duplicate of [Loading cross-domain endpoint with jQuery AJAX](https://stackoverflow.com/questions/15005500/loading-cross-domain-endpoint-with-jquery-ajax) – ejaz Mar 20 '19 at 14:59
  • 1
    Are there any errors whatsoever in your browser's console log? – zero298 Mar 21 '19 at 15:34

0 Answers0