开发者

TWO greyboxes for one window? (JavaScript)

I want to modify a JavaScript function on a (n ASP.NET 2.0) page to show another (different) greybox after the first one has been hidden. Existing snippet:

parent.parent.GB_hide (); /* we are done */

Fancied enhancement:

parent.parent.GB_hide (); /* we are done */
parent.parent.GB_showCenter ('Another One', 'http://google.com'); /* 2nd greybox */

This does not work as expec开发者_如何学Pythonted, because

GB.use_fx
GB.type
GB.show_loading

are all reported to be null or not an object. So I suspect that these are global variables and the two greyboxes are competing for those (but I might be wrong). Has anybody ever tried this? Two greyboxes for the same page?

Kind regards q


I believe one can achieve it as. Initial call to greybox is like this

GB_showCenter('Initital form',url,500,600, closeBack);

closeBack is the javascript method and is a callback function which is triggered when greybox close event occur. You can call second greybox with in this as

function closeBack(){
   GB_showCenter('Second form',url,100,100); 
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜