IE11 Ajax调用不起作用


                    

当我在document.ready下调用requestwidgets函数时,它被成功调用并调用了处理程序。
但是当我从某个函数调用相同的函数时,它不会被调用
注意:这仅在IE11浏览器中发生
下面是代码</ p>

  function CreateNewWidget(){
     $ elementName = $(“#ux_widget_name”)。val();
     $ elementType = $(“#ux_widget_type_dll”)。val();

     $ url ='?request = newelement&elementtype ='+ $ elementType +'&appguid ='+ appguid +'&elementname ='+ $ elementName;

     $ .get($ url,function(data){
         if(data ==“ True”){
             RequestWidgets();
         }
         setTimeout(“ $。fn.slickBox.close()”,3000);
     });

}

var elements = Array();

函数RequestWidgets(){
     $ .get('/ shared / test2.ashx?request = getelements&appguid ='+ appguid,函数(数据){
         xmlDoc = $ .parseXML(data);
         elements = Array();
         RenderElements(elements);
     });
}
</ code> </ pre>
     </ div>

展开原文

原文

When I am calling requestwidgets function under document.ready it is successfully getting called and call to handler is made. But when the same function i am calling from some function it is not getting called Note: This is only happening in IE11 browser Below is the code

function CreateNewWidget() {
    $elementName = $("#ux_widget_name").val();
    $elementType = $("#ux_widget_type_dll").val();

    $url = '?request=newelement&elementtype=' + $elementType + '&appguid=' + appguid + '&elementname=' + $elementName;

    $.get($url, function (data) {
        if (data == "True") {
            RequestWidgets();
        }
        setTimeout("$.fn.slickBox.close()", 3000);
    });

}

var elements = Array();

function RequestWidgets() {
    $.get('/shared/test2.ashx?request=getelements&appguid=' + appguid, function (data) {
        xmlDoc = $.parseXML(data);
        elements = Array();
        RenderElements(elements);
    });
}

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐