Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
AJAX call is not working in IIS 7 and windows 7, the same application is running in XP and IIS 5.
Please help me out.

Here is the sample code

JavaScript
function UpdateSLDataByRow(strWebServicePath, strServerKey) {
	alert("Update SL Data by row called");
    $(function() {         

         var obj1 = { "strServerKey": strServerKey};
        
       var arg = JSON.stringify(obj1);
        $.support.cors = true;
        $.ajax({
            type: "POST",
            datatype: "json",
            url: strWebServicePath + "/UpdateSLDataByRow",
            data: arg,



            contentType: "application/json; charset=utf-8",
            success: function(data, textStatus, xhr) {
                if (typeof console != "undefined") {
                    if (data.d == 1) {
                        console.log('Transaction Status: OK');
                    }
                    else {
                        console.log('Transaction Status: NG');
                    }
                }
            },
            error: function(xhr, textStatus, errorThrown) {
                if (typeof console != "undefined") {
                    console.log(xhr.responseText);
                    alert(sJSSLWebServicePathError);
                }
            }
        });
    });
}
Posted
Comments
F-ES Sitecore 28-May-15 4:03am    
Use your browser's dev tools (f12) or a tool like Fiddler to analyse the network traffic, that often reveals the actual cause of the error.
Imran Khan Hunzai 28-May-15 4:09am    
Dear #F-ES Sitecore thanks for info. But in IE 7, we have no (F12) tool. :(
F-ES Sitecore 28-May-15 4:10am    
Use Fiddler then, it's a free tool, google "download fiddler"
Imran Khan Hunzai 28-May-15 4:57am    
Thanks a lot dear F-ES Sitecore :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900