2013-04-02 60 views
1

使用Highslide我想在使用关闭X关闭ajax窗口时刷新父页面。我已经在页面上有一个按钮,它将执行此操作,但不能保证用户将使用按钮。我已经尝试了一些我已经找到的例子,但没有一个可以工作。highslide refresh parent

hs.Expander.prototype.onAfterClose = function() { 
parent.window.location.reload(); 
} 

hs.Expander.prototype.onAfterClose = function() { 
if (this.a.id == 'tag-send-form') parent.window.location.reload(); 
} 

任何帮助,将不胜感激。

回答

4

在脚本块把这个Highslide JavaScript文件后(或在您的highslide.config.js文件):

hs.Expander.prototype.onAfterClose = function() { 
    window.location.reload(); 
}; 

注:此代码需要highslide-full.js