java - JQuery/Ajax hide() and show() issues while hosting on a server -


the code display specified tables respect department. index page contains page links , div html pages loading. after loading page fetching table id , hiding table calling ajax check hidden table assigned department if shows hidden table, , process continues till table id in pages fetched.

**js**    //loading html page div of index.html  $('#showdata').load('1.org.html);  //show hide come here function showdata(department){          $("#showdata table").each(function(){         //$("#testdiv table").each(function(){             var gid=$(this).attr("id");             var gidnew=gid.replace(/\./g,'\\.');             $('#' +gidnew).hide();             console.log("hide:"+gidnew+"department:"+department);                 $.ajax({                         url : "/bp/selectgroup/"+department+"/"+gid,                         async: false,                         success : function(data){                             var obj = jquery.parsejson(data);                             for(i = 0; < obj.length; i++) {                                 var gid=obj[i].group_id;                                 gid=gid.replace(/\./g,'\\.');                                 $('#'+gid).show();                                 //$("#showdata").load('#'+gid);                                 console.log("show"+gid);                             }                         $("#loading").hide();                         },                         error: function(errorthrown){                             console.log(errorthrown); // if there error can seen through console log.                          }                  });             console.log("aftr ajax::department:"+department);         }); } 

it possible configuration or error reporting on localhost supresses or ignores warnings doesn't on server. try adding config file :

<webservices>     <protocols>         <add name="httpget"/>         <add name="httppost"/>     </protocols> </webservices> 

Comments