开发者

Display alert message before Closing Modal window

开发者 https://www.devze.com 2023-03-15 17:13 出处:网络
I am using ShowModalDialog to open the Dialog Window. While Closing i am displaying Message using alert(\'Submit Successfully\').

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消