的Joomla!模态,在条件下的关闭刷新页面上

时间:2013-03-28 20:41:28

标签: joomla joomla2.5 joomla-extensions joomla-component

使用Joomla! v2.5和modal打开一个新的弹出窗口

<a href="index.php?option=com_mycomponent&view=my_view" class="modal" rel="{handler: 'iframe', size: {x: 800, y: 600}}">

用户将有一些选项(链接),例如info / delete / lock。

选择(单击)选项并单击“关闭”按钮后,我需要关闭模态或关闭模态并刷新页面。

我总是可以使用类似的东西刷新页面

<a href="index.php?option=com_mycomponent&view=my_view" class="modal" rel="{handler:'iframe', size: {x: 800, y: 600},onClose:function(){var js =window.location.reload();}}">

但我需要在条件下刷新页面(例如,用户点击“删除”=&gt;刷新,用户点击“info”=&gt;什么都不做)

想法?

由于

1 个答案:

答案 0 :(得分:0)

对于onClose处理程序,我建议让它调用你自己的自定义JS方法。在该方法中,处理您的自定义逻辑以确定是否刷新页面。