2011-06-28 78 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); 
相關問題