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


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

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


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? 14 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? 14 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