I’ve been doing some tests with the fancybox and what I we really need here at work is some kind of modal that after it’s closed it does a postback in the parent page. I’m trying to make it with fancybox, I’ve read other topics and tried doing it this way, but it doesn’t work, it doesn’t even enter in the event since the alert doesn’t show up:
<script type="text/javascript">
$(document).ready(function () {
$(".various").fancybox({
modal: true,
fitToView: true,
width: 800,
height: 500,
autoSize: false,
closeClick: false,
openEffect: 'fade',
closeEffect: 'fade',
onClose: function () {
alert("Hello");
parent.location.reload(true);
}
});
});
</script>
I’ve also tried doing it with __doPostBack() but didn’t worked either. Can someone help me?
Your callback is wrong. Try
afterClose.