后台代码中弹出js自定义窗口在IE中出错
在后台代码中使用这个弹出窗口Page.ClientScript.RegisterClientScriptBlock(Page.ClientScript.GetType(), "ok ", "_error_msg_show(\ " " + msg + "\ "); ", true);
IE中打运行时会提示无法打开Internet站点
firefox运行正常
我想原因可能是当打开弹出窗口时.ie中原窗口还没有加载完成.导致ie报错.请各位高手帮忙......
其中_error_msg_show源代码如下.是一个js写的
function dialog()
{
var titile = ' ';
var auto = 'y ';
var width = 240;
var height = 120;
var src = " ";
var path = "/images/ ";
var sFunc = ' <input id= "dialogOk " type= "button " value= " 确 定 " onclick= "new dialog().reset(); " /> <input id= "dialogCancel " type= "button " value= " 取 消 " onclick= "new dialog().reset(); " /> ';
var sClose = ' <input type= "image " id= "dialogBoxClose " onclick= "new dialog().reset(); " src= " ' + path + 'close_blue.gif " border= "0 " width= "16 " height= "16 " align= "absmiddle " /> ';
var sBody = '\
<table id= "dialogBodyBox " border= "0 " align= "center " cellpadding= "0 " cellspacing= "6 " width= "100% "> \
<tr height= "10 "> <td colspan= "4 "> </td> </tr> \
<tr> <td colspan= "4 " align= "center "> \
<div id= "dialogMsgDiv " style= "text-align:center "> <div id= "dialogMsg " style= "font-size:12px;line-height:180%; "> </div> </div> \
</td> </tr> \
<tr> <td id= "dialogFunc " colspan= "4 " align= "center "> ' + sFunc + ' </td> </tr> \
<tr height= "5 "> <td colspan= "4 " align= "center "> </td> </tr> \
</table> \
';
var sIfram = '\
<iframe id= "dialogIframBG " name= "dialogIframBG " frameborder= "0 " marginheight= "0 " marginwidth= "0 " hspace= "0 " vspace= "0 " scrolling= "no " style= "position:absolute;z-index:8;display:none; "> </iframe> \
';
var sBox = '\
<div id= "dialogBox " style= "border:1px solid #1e4775;display:none;z-index:10;width: '+width+ 'px; "> \
<table width= "100% " border= "0 " cellpadding= "0 " cellspacing= "0 "> \
<tr height= "24 " bgcolor= "#6795B4 "> \
<td> \
<table onselectstart= "return false; " style= "-moz-user-select:none; " width= "100% " border= "0 " cellpadding= "0 " cellspacing= "0 " style= "background-color:#5499dc; height:25px; border-top:1px solid #92c3ec; "> \