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


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


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 13 Years, 10 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 13 Years, 10 Months ago Karma: 760
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 13 Years, 10 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 13 Years, 10 Months ago Karma: 760
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 13 Years, 10 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