如何在asp.net Web应用程序中关闭灰盒 [英] how to close greybox in asp.net web application

查看:99
本文介绍了如何在asp.net Web应用程序中关闭灰盒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我如何使用Button服务器控件关闭灰盒


how i can close the greybox using Button server control

推荐答案

如果您表示的是与我相同的Greybox,则可能需要尝试以下操作:

If you mean the same Greybox as I do then you might want to try this:

var GB = function(caption, /* optional */ height, width, callback_fn) {
    var options = {
        caption: caption,
        height: height || 500,
        width: width || 500,
        fullscreen: false,
        show_loading: false,
        callback_fn: callback_fn
    }
    var win = new GB_Window(options);
    return win;
}



上面的代码在页面上的脚本标签中. GB是一个全局变量,现在拥有对灰箱的引用.因此,很容易用它来做这样的事情:



The above code is in a script tag on your page. GB is a global variable that now holds a reference to the greybox. So it''s easy to do stuff like this with it:

GB.show(someURL); // show the box
GB.hide();        // hide the box



该按钮应调用javascript GB.hide()才能关闭灰色框.

干杯!



The button should call javascript GB.hide() in order to close the greybox.

Cheers!


这篇关于如何在asp.net Web应用程序中关闭灰盒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆