完成更新面板回发后,我们如何执行客户端代码?

问题描述:

当我们点击复选框并在重新获取数据后隐藏加载程序时,我有一个问题是显示加载程序图像。现在,当我们检查复选框时,加载时会加载'divData'。现在,我的场景是这样的divData在updatepanel中,async trigger复选框与它关联。现在我正在显示这样的Loader



I have an issue to show the Loader Image when we click the checkbox and hide the loader after retriving the data .Now the 'divData' will be loaded by the load when ever we check the checkbox.Now my scenario is like this the divData is in updatepanel and async trigger checkbox is associated to it.Now I am Showing the Loader like this

function ShowProgress(displayValue) {

            var modal = $("<div id="divLoading" />");
            modal.addClass("modal");
            modal.css('display', displayValue);
            $('body').append(modal);
            var loading = $(".loading");
            loading.show();
            var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
            var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
            loading.css({ top: top, left: left, display: displayValue });
        }





这里我点击复选框后传递displayValue'inline'。我已编写代码来隐藏将数据绑定到divData后给出的加载程序图像。





here I am passing the displayValue 'inline' when we click the checkbox.I have written code to hide the loader image as given after binding the data to divData.

ClientScript.RegisterClientScriptBlock(Page.GetType(), "Unload", "ShowProgress('none');", True)





现在上面的代码无法隐藏加载器。复选框控件不在另一个updatepanel中。我已经尝试了所有方法。任何人都可以帮我找到解决方案吗?



Now the above code is not working to hide the loader.The checkbox control is not in another updatepanel.I've tried all the ways . Can anyone help me to find a solution?

< div id = divLoading />);
modal.addClass( modal);
modal.css(' display',displayValue);
("<div id="divLoading" />"); modal.addClass("modal"); modal.css('display', displayValue);


' body')。append(modal);
var loading =
('body').append(modal); var loading =


加载跨度>)。
loading.show();
var top = 数学 .max(
(".loading"); loading.show(); var top = Math.max(