I know there is a lot of topics with this questions, but I don't found the answer to my particular question ...
Refer to the FAQ, we had to use one of these to close the fancybox.
$.fancybox.close();
or
parent.$.fancybox.close();
But this doesn't work in my case.
I use an AJAX type of fancybox, see below :
$('.fancybox2').fancybox({
type: 'ajax',
title: 'Admin',
maxWidth : 800,
maxHeight : 400,
fitToView : false,
width : '70%',
height : '70%',
autoSize : false,
closeClick : false,
openEffect : 'elastic',
closeEffect : 'none',
});
So after the click on a button, it shows another page in the fancybox. In this page there is a button with the following code :
<input type=button onclick="$.fancybox.close();" value="Save" style="margin-top:30px;" class=button>