I am trying to redirect to the URL that is on my "onclose" attribute of the .fancybox ... it just does work. Any ideas? Code is below. Note: the modal appears fine, but when the user presses the "x" at the top... the screen is just blank.
<script type="text/javascript">
showModal();
function showModal() {
var url = document.URL;
var popUp = '//local.meau/Support-Center/Service-Notifications/Search-Tips.aspx';
var site = popUp;
$(document).ready(function () {
$.fancybox({
'width': 500,
'height': '55%',
'autoScale': false,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe',
'href': site,
'showCloseButton': true,
'onClose' : function(){location.href = ".aspx";}
});
});
}
</script>
I am trying to redirect to the URL that is on my "onclose" attribute of the .fancybox ... it just does work. Any ideas? Code is below. Note: the modal appears fine, but when the user presses the "x" at the top... the screen is just blank.
<script type="text/javascript">
showModal();
function showModal() {
var url = document.URL;
var popUp = '//local.meau./Support-Center/Service-Notifications/Search-Tips.aspx';
var site = popUp;
$(document).ready(function () {
$.fancybox({
'width': 500,
'height': '55%',
'autoScale': false,
'transitionIn': 'none',
'transitionOut': 'none',
'type': 'iframe',
'href': site,
'showCloseButton': true,
'onClose' : function(){location.href = "http://local.meau./Support-Center.aspx";}
});
});
}
</script>
Share
Improve this question
asked Jul 16, 2013 at 21:12
Paul T. RykielPaul T. Rykiel
1,2276 gold badges27 silver badges52 bronze badges
1
-
maybe because the right name of the callback is
onClosed
(fancybox v1.3.4) – JFK Commented Jul 16, 2013 at 23:49
1 Answer
Reset to default 5updated your code to read
window.location = "http://local.meau./Support-Center.aspx"
Double check your onClose callback as well
- v1.2 - http://fancybox/api/126 -
callbackOnClose
- v1.3 - http://fancybox/api -
onClosed
- v2.0 - http://fancyapps./fancybox/#docs -
beforeClose
orafterClose