I open another in a form with fancybox library.
I enter the code:
$(".fancybox").fancybox({
fitToView: false,
beforeLoad: function () {
this.width = parseInt(this.element.data('fancybox-width'));
this.height = parseInt(this.element.data('fancybox-height'));
},
iframe:{
preload: !(document.all && !document.querySelector)
},
afterClose: function (a, b, c) {
$("#BtnCerca")[0].click();
},
autoSize: false,
closeClick: false,
openEffect: 'fade',
openEasing: 'swing',
closeEffect: 'elastic',
closeClick: true,
padding: ['8', '8', '8', '8'],
});
and clicked on the link I put the classes "fancybox fancybox.iframe" and the link to be opened is inserted nell'href, so that may open the second form as an iframe.
But it happens that when I open the iframe afterClose the event takes place before the opening of the form and not after its closure.
Something wrong? I ask for help .... david