function show(){
var oldState = window.parent.state;
setTimeout(function(){load(oldState)},tipTime);
}
* 公用查询超时提示时间*/
window.tipTime = 3000;
function load(oldStatus){
//window.parent.frames["mainFrame"].document.getElementById("batchOn").style.display = "block";
var loaddivN = '<div id="batchOn" style="position:absolute;left:35%;top:25%;"><img src="../images/loadingon.gif"/><div style="display:inline;position:absolute;top:50%;width:120px;font-size: 12px;padding-left: 7px;" > 加载中,请稍后...</div></div>';
var mainFrame = window.parent.frames["mainFrame"];
if (mainFrame != null){ //页面处于menu.jsp或框架mainFrame中
var ua = window.navigator.userAgent;
var flag; //frame没有返回时状态
if (/MSIE/.test(ua) || /Chrome/.test(ua)) {//IE浏览器、Google Chrome
flag = 'LOADING';
}else{
flag = 'UNINITIALIZED';
}
var doc = mainFrame.document;
var hre = window.location.href;
if(/menu.jsp/.test(hre)){ //页面处于menu.jsp中
var state = window.parent.state;
if((state != oldStatus && doc.readyState.toUpperCase() == flag) //第1、2种情况
|| state == oldStatus){ //mainFrame没有后台返回
doc.getElementsByTagName("body")[0].innerHTML = loaddivN;
}
/** else if(doc.readyState.toUpperCase() == 'INTERACTIVE'){ //第3种情况,已加载部分文档
var iframe = mainFrame.window.frames;
if(iframe.length != 0){
for(var i=0;i<iframe.length;i++){
var name = iframe[i].name;
var newState = mainFrame.window.state;
if(name == "mainBusinessDictFrame" || name == 'mainSystemDictFrame'){//第3种情况
var docState = iframe[i].document.readyState.toUpperCase();
if(docState == flag || newState == 0){ //iframe没有后台返回
var ifDoc = iframe[i].document;
var body = ifDoc.getElementsByTagName("body")[0];
body.innerHTML = loaddivN;
}
}
}
}
}*/
}else{ //页面处于框架mainFrame中
/** var ua = window.navigator.userAgent;
var flag; //frame没有返回时状态
if (/MSIE/.test(ua) || /Chrome/.test(ua)) {//IE浏览器、Google Chrome
flag = 'LOADING';
}else{
flag = 'UNINITIALIZED';
}*/
var iframes = $("iframe[id!='']");
if (iframes.length == 0){//当前页面没有除时间选择器外的iframe
doc.getElementsByTagName("body")[0].innerHTML = loaddivN;
}
/** if (iframes.length != 0){ //当前页面有除时间选择器外的iframe
var iframe = window.frames;
for(var i=0;i<iframe.length;i++){
var ifDoc = iframe[i].document;
var body = ifDoc.getElementsByTagName("body")[0];
var name = iframe[i].name;
if(name == "framelist" || name == "mainBusinessDictFrame"
|| name == 'mainSystemDictFrame'){ //iframe
var docState = iframe[i].document.readyState.toUpperCase();
var newState = window.state;
alert("newState="+newState+",oldStatus="+oldStatus);
if((docState == flag && newState != oldStatus)
|| newState == oldStatus){//后台没有返回
body.innerHTML = loaddivN;
}
}
}
}else{ //当前页面没有除时间选择器外的iframe
doc.getElementsByTagName("body")[0].innerHTML = loaddivN;
}*/
}
}else { //当前页面处于iframe中
document.getElementsByTagName("body")[0].innerHTML = loaddivN;
}
}