Display alert message before Closing Modal window
I am using ShowModalDialog to open the Dialog Window. While Closing i am displaying Message using alert('Submit Successfully').
Problem is, Message is displaying in blank page.
function CloseWindow(Stat, msg) {
alert(msg);
window.returnValue = Stat;
self.close();
}
开发者_如何学Go
In codebehind,
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "My", " CloseWindow('1','Submit Successfully');", true);
I resolved this issue
just changed the code behind code.
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "My", "window.onload=function(){ CloseWindow('1','Submit Successfully');}", true);
精彩评论