admin管理员组

文章数量:1349663

I have a Fancybox that opens a contact form from an iframe. Inside the iframe, i have a close button but it's not working.

I have tryed both with $.fancybox.close(); and parent.jQuery.fancybox.close();

What am I doing wrong ?

I have a Fancybox that opens a contact form from an iframe. Inside the iframe, i have a close button but it's not working.

I have tryed both with $.fancybox.close(); and parent.jQuery.fancybox.close();

What am I doing wrong ?

Share Improve this question edited Mar 5, 2023 at 4:00 asked Nov 10, 2012 at 6:38 user1733295user1733295
Add a ment  | 

2 Answers 2

Reset to default 9

As per http://fancybox/api Try this instead :

parent.$.fancybox.close();

The problem is you are trying to execute parent windows js function with different host name ( its not allowed ). Try access you site without www. ( this is because your contact button using fancy from url without www. )

本文标签: javascriptClose fancybox from iframeStack Overflow