2011-06-28 79 views
0

我正在使用ShowModalDialog打开对话框窗口。关闭时我正在显示消息使用警报('提交成功')。在关闭模式窗口之前显示警告消息

问题是,消息显示在空白页中。

function CloseWindow(Stat, msg) { 
      alert(msg); 
      window.returnValue = Stat; 
      self.close(); 
     } 

在代码隐藏,

Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "My", " CloseWindow('1','Submit Successfully');", true); 
+0

不是很清楚。你能告诉我们你的加价和一些截图吗? – Tsar

回答

0

我解决了这个问题

只是改变后面的代码的代码。

Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "My", "window.onload=function(){ CloseWindow('1','Submit Successfully');}", true); 
相关问题