top of page
Hello Lightboxes

Hello Lightboxes

Get started with lightboxes.

Intermediate.png

Beginner

1K

Published:

February 26, 2023

Girl Enjoying her Drink

by

Anchor 1
Hire a Developer

Example Description

A lightbox is a popup overlay that appears on top of a page while dimming the page in the background. Visitors cannot interact with other content on the website while the lightbox is open. In this example, we demonstrate how to open and close a lightbox using code, as well as how to send information from the page to the lightbox and from the lightbox to the page.

Example Code

Tab 1

.

Tab 2

.

Tab 3

.

This code solution can be complicated.

How We Built It

Home Page Elements


On the HOME page we added 2 radio button groups and a button for selecting data and opening the lightbox.


Page Code


On the HOME page we used code to create an event handler that runs when the button on the page is clicked. The event handler reads the selections made on the page, opens the Greeting Lightbox, and sends it the selection information.


Lightbox Elements


In the Greeting Lightbox we added 2 text elements to display the data sent to the lightbox from the page, and some buttons to close the lightbox and send some information back to the page.


Lightbox Code


In the Greeting Lightbox we used code to read the information sent from the page and populate it into 2 text elements. We also created an event handler for the lightbox's buttons that closes the lightbox and sends some information back to the page.

APIs We Used

Non-code example.

Non-code example.

Related Articles

Article Link

Hire a Developer

Velo solutions are powerful tools, but building them on your own can be challenging. Let an experienced Velo development shop build it for you, so you can keep working on your site or business.

Related Examples

Did this help?

Yes

|

No

Thanks for your feedback!

Image placeholder.png

Add to Cart Gallery

Let customers to add products to their cart

Intermediate.png

INTERMEDIATE

Image placeholder.png

Hide and Show Elements

Hide and show elements in response to user interactions

Begginer.png

BEGGINER

Image placeholder.png

Hide and Show Elements

Hide and show elements in response to user interactions

Begginer.png

BEGGINER

Anchor 2
bottom of page