Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

JavaScript "Failed to load resource: the server responded with a status of 404 (Not Found)"

$
0
0

Hi everyone,

Thank you for helping in advance,

I got an error when debugging my JavaScript code

"Failed to load resource: the server responded with a status of 404 (Not Found)"

on the line: "xmlHttpRequest.send();"

full code:

 executeRequest: function (request) {
        var xmlHttpRequest = new XMLHttpRequest();
        var response = null;
        xmlHttpRequest.open("GET", OrgDataService.getRESTUrl() + request, false);
        xmlHttpRequest.setRequestHeader("Accept", "application/json");
        xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        xmlHttpRequest.send();
        return xmlHttpRequest.responseText;
    },

    getRESTUrl: function () {
        var serverUrl = Xrm.Page.context.getClientUrl();
        return serverUrl.substring(serverUrl.lastIndexOf("/")) + "/xrmservices/2011/organizationdata.svc";
    }

Thank you again!


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>