views:

386

answers:

3

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.close(); but it cause some error.. thanks in adance...

A: 

Remember the Same origin policy

If your iframe is from another domain you can't have js communication with your site

AntonioCS
A: 

If your iframe is on the same domain try using parent.fancybox_instance.close() inside the iframe

tomaszsobczak
A: 

I use this script to close a Fancybox iframe after submission:

parent.$.fn.fancybox.close();
Sonny