Ajax在某些系统中不起作用(chorme) [英] Ajax not working in some systems(chorme)

查看:51
本文介绍了Ajax在某些系统中不起作用(chorme)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我试图用ajax实现弹出功能。在大多数系统中工作正常。但在一些奇怪的系统中数据失败加载和弹出是空白的(它在我们所有的系统中工作正常,但有些客户

报告空白弹出窗口。)我使用的代码如下,你能说明我可能出错的地方吗? ..请建议



我尝试过:



HTML:



im trying to implement a pop up functonality with ajax.it is working fine in most of the system.but in some odd systems the data fails to load and popup goes blank(it is working fine in all of our systems but some clients
reporting about the blank popups).the code i used is given below,can you suggest where i might gone wrong..please suggest

What I have tried:

HTML:

<div id="divOverlayDetailsLocation" class="web_dialog_overlay">
</div>
<div id="divDialogLocationDetails" class="service_web_dialog" style="width: 1100px;margin-left: -549px; margin-top: -130px">
   <div class="web_dialog_title">
      <label id="UserTittle">
      @Model.GetLanguageText("SERVICE059")</label>
      <i class="typcn typcn-times icon-2x close-image" onclick="HideDialogLocationPopUp()">
      </i>
   </div>
   <div style="width: 100%;float: left;border-bottom:dotted 1px #2B597E;">
      <label id="SERVICE059" style="margin-top: 7px; margin-left: 6px;" class="lblSize2">@Model.GetLanguageText("SERVICE059") </label> 
      <div  id="SrchPnl" class="SrchPnl" style="float: left !important;margin-bottom:3px;margin-top:3px;margin-right: 42px;" >
         <input maxlength="255" type="text" id="JSearchText" name="SearchString" class="textbox" placeholder="Search here..">
         <div id="JSearch"  class="divsearch"><i onclick="filter();" class="icon-search icon-2x"></i></div>
         <div id="JClose" class="divsearch close"><i onclick="dialogueclose();" class="icon iconuboss-ionicons-63 icon-2x"></i></div>
      </div>
      <input id="selactall" name="selactall" class="regular-checkbox" type="checkbox" value="true"  onclick="selectallcallcenter()" hspace="5px"  />
      <label for='selactall' class='check'>
      </label>
      <label id="COMMONA032" class='chklabel check'> Select All</label>
   </div>
   <br>
   <br>
   <div id="CallcenterList" style="height:500px;overflow-y: scroll;">
      <br>
      <br>
   </div>
   <div style="border-top:dotted 1px #2B597E;"></div>
   <input id="COMMONA042" type="button" class="AddBtn" value="Select" onclick="SelectDrop();"  style="margin-left: 441px;"/>
</div>





C#return string:





C# return string:

<span title='Forley Generics' id='Forley Generics' style='float:left;margin-removed 1%;margin-removed 17px;width:24%'><input class='regular-checkbox call'  hspace='5px' value=9017 type='checkbox'  id="Chk19017Forley Generics" name="Forley Generics"   /><label class='check' for='Chk19017Forley Generics'></label><label style='margin-removed10px'>Forley Generics</label></span><span title='ITHelpdesk' id='ITHelpdesk' style='float:left;margin-removed 1%;margin-removed 17px;width:24%'><input class='regular-checkbox call'  hspace='5px' value=195 type='checkbox'  id="Chk1195ITHelpdesk" name="ITHelpdesk"   /><label class='check' for='Chk1195ITHelpdesk'></label><label style='margin-removed10px'>ITHelpdesk</label></span><span title='Testing' id='Testing' style='float:left;margin-removed 1%;margin-removed 17px;width:24%'><input class='regular-checkbox call'  hspace='5px' value=521 type='checkbox'  id="Chk1521Testing" name="Testing"   /><label class='check' for='Chk1521Testing'></label><label style='margin-removed10px'>Testing</label></span>







AJAX CALL:






AJAX CALL:

$.ajax({
       url: "/HeatMapReport/LoadCallGroup/@Convert.ToInt32(Model.CompanyType)/@Model.CompanyId",
       data: {selectedtext : selectedtext, CallCenterId : CallCenterId },
       type: "post",
       cache: false,
       success: function (datas) {

      var drop="";
          $("#divDialogLocationDetails #CallcenterList").html(datas);


         $("#divDialogLocationDetails").show();


            hideProgress();
       },
       error: function (xhr, ajaxOptions, thrownError) {
          $("#divDialogLocationDetails").hide();
            hideProgress();
       }
   });

推荐答案

.ajax({
url: / HeatMapReport/LoadCallGroup/@Convert.ToInt32(Model.CompanyType)/ @ Model.CompanyId
data:{selectedtext:selectedtext,CallCenterId:CallCenterId},
type: post
cache: false
成功: function (数据){

var drop = ;
.ajax({ url: "/HeatMapReport/LoadCallGroup/@Convert.ToInt32(Model.CompanyType)/@Model.CompanyId", data: {selectedtext : selectedtext, CallCenterId : CallCenterId }, type: "post", cache: false, success: function (datas) { var drop="";


#divDialogLocationDetails #CallcenterList)。html(datas);
("#divDialogLocationDetails #CallcenterList").html(datas);


#divDialogLocationDetails)。show();


hideProgress();
},
错误: function (xhr,ajaxOptions,thrownError){
("#divDialogLocationDetails").show(); hideProgress(); }, error: function (xhr, ajaxOptions, thrownError) {


这篇关于Ajax在某些系统中不起作用(chorme)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆