禁止在IE上弹出“此页面正在访问信息..." [英] To suppress pop up on IE 'This page is accessing information......'
本文介绍了禁止在IE上弹出“此页面正在访问信息..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想为我的项目进行跨域数据访问,但我使它工作了,但是我受此弹出窗口的约束,上面写着此页面正在访问信息……".要通过显式更改浏览器设置来禁止显示,可以修改我的工作代码以禁止显示此消息.
我的工作代码弹出
I want cross domain data access for my project and i made it work but i am stuck with this pop up which says ''This page is accessing information.......'' .I don''t want to suppress it by explicitly changing browser settings, can''t i modify my working code to suppress this message.
My working code with pop up
$.ajax({
url: "http://sys85/testservice/serviceCall.ashx",
dataType: "text",
type: 'get',
crossDomain: true,
success: function (data) {
},
error: function (jqXHR, textStatus, errorThrown) {
if (window.console) console.log("Error... " + textStatus + " " + errorThrown);
}
});
}
我的处理程序文件返回结果(serviceCall.ashx)
My handler file to return result(serviceCall.ashx)
string result = "121";
context.Response.ContentType = "application/json";
context.Response.Write(result);
do i have to make any changes with my handler file ??
Also tried this way
$(document).ready(function () {
var url = "http://sys85/testservice/serviceCall.ashx";
$.getJSON(url + "?callback=?", null, function (data) {
alert(data);
})
.error(function (jqXHR, textStatus, errorThrown) {
console.log("Error... " + textStatus + " " + errorThrown);
document.getElementById('lblmsg').value = "Error... " + textStatus + " " + errorThrown;
})
});
i get "Uncaught TypeError: Object # has no method 'error' " error
Tried every possible ways to get rid of this message Any help will be appreciated.
推荐答案
.ajax({ url:" , dataType:" , 类型:' 获取', crossDomain: true , 成功:功能(数据){ }, 错误:函数(jqXHR,textStatus,errorThrown){ 如果(窗口.控制台)控制台 .log(" + textStatus + " + errorThrown); } }); }
.ajax({ url: "http://sys85/testservice/serviceCall.ashx", dataType: "text", type: 'get', crossDomain: true, success: function (data) { }, error: function (jqXHR, textStatus, errorThrown) { if (window.console) console.log("Error... " + textStatus + " " + errorThrown); } }); }
我的处理程序文件返回结果(serviceCall.ashx)
My handler file to return result(serviceCall.ashx)
string result = "121";
context.Response.ContentType = "application/json";
context.Response.Write(result);
do i have to make any changes with my handler file ??
Also tried this way
(文档).ready(函数(){ var url = " ;
(document).ready(function () { var url = "http://sys85/testservice/serviceCall.ashx";
.getJSON(url + ?callback =?",功能(数据){ 警报(数据); }) .error(函数(jqXHR,textStatus,errorThrown){ 控制台 .log(" + textStatus + " + errorThrown); 文档 .getElementById(' lblmsg') .value = " + textStatus + " + errorThrown; }) });
.getJSON(url + "?callback=?", null, function (data) { alert(data); }) .error(function (jqXHR, textStatus, errorThrown) { console.log("Error... " + textStatus + " " + errorThrown); document.getElementById('lblmsg').value = "Error... " + textStatus + " " + errorThrown; }) });
i get "Uncaught TypeError: Object # has no method 'error' " error
Tried every possible ways to get rid of this message Any help will be appreciated.
这篇关于禁止在IE上弹出“此页面正在访问信息..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文