Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
var data_pass = "{cityid:'" + cityid + "', status:'" + st + "', inboxstatus:'" + inst + "'}"
           $.ajax({
               type: "POST",
               url: path + "/function_name;, // active_hotels is an function of above webservice file
               data: data_pass,
               contentType: "application/json; charset=utf-8",
               dataType: "json",
               success: function (result) {

                     alert("success");
                
               },
               failure: function () {
                   alert("fail");
               },
               error: function (jqXHR, exception) {

                   if (jqXHR.status === 0) {
                       alert('Not connect.\n Verify Network.');
                   } else if (jqXHR.status == 404) {
                       alert('Requested page not found. [404]');
                   } else if (jqXHR.status == 500) {
                       alert('Internal Server Error [500].');
                   } else if (exception === 'parsererror') {
                       alert('Requested JSON parse failed.');
                   } else if (exception === 'timeout') {
                       alert('Time out error.');
                   } else if (exception === 'abort') {
                       alert('Ajax request aborted.');
                   } else {
                       alert('Uncaught Error.\n' + jqXHR.responseText);
                   }

               }
           });



This coding return the Not connect.\n Verify Network error. I am using web service with calling bulk of data from sql server. i doesnt know what is mean "Not connect" error in this ajax. if anybody know pls reply.
Posted

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