I have a shadow box, and it contains a form , the problem is when the form is submitted shadow box doesn’t get closed.I’ve used these functions ,
self.close();
window.parent.Shadowbox.close();
but still no luck, can any one help me, thanks
This is how I created the shadow box
<a href="#" id="mylink">Example shaodow box</a>
<script language="javascript">
$('#mylink').click(function(){
Shadowbox.open({
content: 'mybox.php',
player: 'iframe',
height: 550,
width: 800,
options: {
onClose: function() {
top.location = "index.php?mydata=asas1234";
}
}
});
});
</script>
You must call
ShadowBox.init({...})before calling other methods.