Click here to Skip to main content
15,881,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi getting error in firefox and chrome but not in IE when i call a home controller method using jquery as below


JavaScript
function GetTempDetails() {
   
    _TempIds["iHospitalId"] = "1";
    _TempIds["iClinicId"] = "2";
    _TempIds["iDoctorId"] = "3";

    $.ajax({
        type: "POST",
        url: "../Home/GetTemplate",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: JSON.stringify(_TempIds),
        error: function (xhr,statusText) {
           
           // alert(xhr.responseText);
            alert("Error while processing the request, please try again.");
         },
        success: function (result, textStatus) {
        
       alert("succ");

      }
     });
}


in firefox and chrome getting error part.how to solve this?

that is

getting alert inside error part

error: function (xhr,statusText) {

// alert(xhr.responseText);
alert("Error while processing the request, please try again.");
},

that is 'Error while processing the request, please try again'

thanks.
Posted
Updated 21-Aug-13 23:47pm
v3
Comments
thatraja 22-Aug-13 5:38am    
:'( what's the error message? include that in your question always
hasbina 22-Aug-13 5:44am    
getting alert inside error part

error: function (xhr,statusText) {

// alert(xhr.responseText);
alert("Error while processing the request, please try again.");
},

that is 'Error while processing the request, please try again'
thatraja 22-Aug-13 5:48am    
Get the value of xhr
alert(xhr)
alert(xhr.responseText)
hasbina 22-Aug-13 5:51am    
alert(xhr.responseText) giving blank alert in firefox.
Jameel VM 22-Aug-13 6:32am    
did you print the error message?

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