Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 05/09/2017 BIG Autumn SALE

    Use AUTUMN17 coupon code to buy our WordPress or Joomla! extensions with 25% discount. Hurry up! The offer is valid till 11 September.

  • 14/04/2017 Happy Easter

    Wish a Happy Easter and give 30% discount for all our WordPress and Joomla! extensions. Use EASTER17 coupon code. The offer is valid till 17 April.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Close fancybox by JS function call
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Close fancybox by JS function call
#10399
Close fancybox by JS function call 6 Years, 8 Months ago Karma: 0
Hi,

which function have I to call if I want fancybox to close?

$.fancybox.close() -> doesn't work for me...

Thanks and best regards
Marco
The administrator has disabled public write access.
 
#10400
Re:Close fancybox by JS function call 6 Years, 8 Months ago Karma: 667
Hello,

Try to use the next code:

Code:


(window["jQueryFB"] || jQuery).fancybox.close();



If it doesn't work, provide link to page where we can see this problem please.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#10404
Re:Close fancybox by JS function call 6 Years, 8 Months ago Karma: 0
Thanks for your quick response!
Unfortunately it doesn't work. I get the following js-error:

Fehler: jQuery is not defined
Quelldatei: qs.geocaching-nrw.de/ext/mitcachezentrale/actionMczEvent.php?action=comment&gcnrw_pid=YTozOntzOjY6Im1jel9pZCI7czoxOiIxIjtzOjc6InVzZXJfaWQiO3M6MjoiNjMiO3M6OToidXNlcl9uYW1lIjtzOjExOiJLcsO8bWVsYnJvdCI7fQ==%27
Zeile: 8


Be advised: The content of this is not Joomla! It's an external PHP script.

I call fancybox as follows:

class="arifancybox iframe {width: 800, height: 450}"

Everything works fine, but the fancybox should be closed, if the form shown in the box is submitted. After this, the parent window should be refreshed. The js-code called after form is submitted:

Code:

echo '<script>(window["jQueryFB"] || jQuery).fancybox.close();parent.location.reload();</script>';


Unfortunately the site is not available for public. If you need access, let me know your mailadress and I will send you the login.

Best regards
Marco
The administrator has disabled public write access.
 
#10405
Re:Close fancybox by JS function call 6 Years, 8 Months ago Karma: 667
If you want to call "close" method from <IFRAME>, use the following code:

Code:


(parent["jQueryFB"] || parent["jQuery"]).fancybox.close();



Regards,
ARI Soft
The administrator has disabled public write access.
 
#10407
Re:Close fancybox by JS function call 6 Years, 8 Months ago Karma: 0
This works, great!
Thank you so much, you made my day.

Best regards
Marco
The administrator has disabled public write access.
 
Go to topPage: 1