Highslide JS Base Fiddle - RoadRash
HTML
<script src="http://highslide.com/highslide/highslide-full.js"></script>
<link rel="stylesheet" href="http://highslide.com/highslide/highslide.css">
<div>
<p>
<a class="timeout" href="/roadrash/7AHX9/show/light/" onclick="return hs.htmlExpand(this, { objectType: 'iframe' } )">
Content in iframe
</a>
<br />- has class="timeout", the parent page will reload 3 seconds after closing the popup
</p>
<p><a href="/roadrash/7AHX9/show/light/" onclick="return hs.htmlExpand(this, { objectType: 'iframe' } )">
Content in iframe
</a>
<br />- no className, the parent page will not reload after closing the popup
</p>
</div>
JavaScript
// Reload parent page after n seconds using onAfterClose event based on className
// Requires highslide-full.js
hs.graphicsDir = 'http://highslide.com/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';
// Reload parent page after n seconds using onAfterClose event based on className
hs.Expander.prototype.onAfterClose = function (sender) {
alert('dfdfdf ffff');
if (/timeout/.test(this.a.className)) setTimeout(function () {
try {
window.parent.location.reload();
} catch (e) {}
}, 3000);
};