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


Recent Events
  • 18/11/2017 Black Friday is coming

    Don't wait BLACK FRIDAY, use FRIDAY17 coupon code to get 35% discount for all our extensions right now.

  • 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.


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 lightbox from inside the lightbox?
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: close lightbox from inside the lightbox?
#4732
Re:close lightbox from inside the lightbox? 7 Years, 6 Months ago Karma: 0
perfect, now it works just fine!

thanks a lot,
regards maeck
The administrator has disabled public write access.
 
#9302
Re:close lightbox from inside the lightbox? 7 Years ago Karma: 0
Thought I would post this here since it's related.
If you have a form within a lightbox and you want to close the lightbox on submit you can add the following to the input tag:
onclick="parent.location.reload();parent.SexyLightbox.close()"
This will close the lightbox when the form is submitted and refresh the main page to show changes if needed.

If you don't need the main page to refresh you can do the same except omitting the reload part such as:
onclick="parent.SexyLightbox.close()"

As an example I have a form to edit blog posts that load in a lightbox.
I have two buttons, one to save the changes and one to cancel.
On the save button I use both the reload and close function, and on the cancel button I just use the close function.
The administrator has disabled public write access.
 
Go to topPage: 12