Question

Hello i trying to to save response from htmlpage and save the content of this page, but i always getting an error.What i am doing wrong?

<script type="text/jscript">
    var page = "";


    $.ajax({
        url: "https://www.bbvanetcash.com/local_kyop/KYOPSolicitarCredenciales.html",
        type: "GET",
        cache: false,
        crossDomain: true,
        cache: false,
        contentType: "application/json; charset=utf-8",
        data: {},
        jsonp: 'jsonCallback',
        dataType: "jsonp",
        success: function (data) {
            page = data;
            console.log("Good");
        },
        error: function (e) {
            console.log("Error");//here where i am stuck

        }
    });

</script>
Was it helpful?

Solution

"https://www.bbvanetcash.com/local_kyop/KYOPSolicitarCredenciales.html" - i think its URL belong from other domain not from your home/base domain url. that's why you getting error.

You can not make a AJAX http request for NON HOME url.

NON HOME: Its means you can only access your Base domain content though ajax.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top