2011-07-20 28 views
0

我想修改(n ASP.NET 2.0)页面上的JavaScript函数,以在第一个隐藏后显示另一个(不同的)灰箱。现有的片段:一个窗口的两个灰色盒子? (JavaScript)

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

幻想增强:

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

预期这是不行的,因为

GB.use_fx 
GB.type 
GB.show_loading 

都报告为空或不是对象。 所以我怀疑这些是全局变量,两个灰箱正在竞争那些(但我可能是错的)。 有没有人试过这个?两个greyboxes为相同的 页面?

亲切的问候 q

回答

1

我相信我们可以实现它。到greybox初始呼叫是这样

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

closeBack是JavaScript的方法,并且当greybox关闭事件发生时被触发一个回调函数。您可以在此调用第二个灰箱,作为

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