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 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? 13 Years, 10 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? 13 Years, 4 Months 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