I have to do some form submission and then get out of the fancybox which holds an iframe. How to do that? I tried using $.fn.fancybox开发者_JS百科.close(); but it cause some error. 
Remember the Same origin policy
If your iframe is from another domain you can't have js communication with your site
I use this script to close a Fancybox iframe after submission:
parent.$.fn.fancybox.close();
use this simply
$.fancybox.close();
If your iframe is on the same domain try using parent.fancybox_instance.close() inside the iframe
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论