I am using the 'Colorbox' (http://colorpowered.com/colorbox/)jQuery plugin to display modal window. One of the modal window is a login window. It loads an external login page into the modal window.
The problem is when i enter my credentials in the modal window and login, it logs in correctly inside the 开发者_运维技巧window. However when I close the window, the main page (which contained the link to the login modal window) still shows the stale 'Not logged in' status.I need to refresh the entire page to see the 'logged in' status.
How can i update the main page as soon as I login and close the login modal window.?
there is a onclosed function in color box like this below, you can use a window.load function in on onClosed function
$(".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'); }
});
精彩评论