在登录模态窗口后刷新/更新主页


Refreshing/updating the main page after logging in a modal window

我使用'Colorbox' (http://colorpowered.com/colorbox/)jQuery插件显示模态窗口。其中一个模态窗口是登录窗口。它将一个外部登录页面加载到模态窗口中。

问题是当我在模态窗口中输入我的凭据并登录时,它在窗口内正确登录。然而,当我关闭窗口时,主页面(其中包含登录模式窗口的链接)仍然显示陈旧的"未登录"状态。我需要刷新整个页面来查看"登录"状态。

我怎么能更新主页,只要我登录和关闭登录模式窗口?

在颜色框中有一个onclosed函数,就像下面这样,你可以使用一个窗口。在onClosed函数中加载函数

$(".example9").colorbox({
                onOpen:function(){ alert('onOpen: colorbox is about to open'); },
                onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
                onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
                onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
                onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
            });