Redirect parent after close of form submission lightbox



I’m trying to send the user to my actual website automatically after receiving the success message from completing a form submission.

When the form is complete the lightbox pops up, but I can’t manage to redirect them after they close the lightbox.

I’ve tried this:

var closelightbox = document.getElementById('element-id');
closelightbox.onclick = redirectPage;

function redirectPage() { = ""; 
	return false;	

For element-id, I have used:


It works on elements within the lightbox but not anything outside of the lightbox. Essentially I want to click anywhere on the page and be redirected.

And just body wide:

$(document.body).click(function() { = ""; 

Any ideas?



Hey @Savage I believe this is what you’re looking for let me know if that works for you.


Hi @digibomb,

Thanks for your reply. I don’t think Unbounce uses featherlight?

It has it’s own script here:

But I can’t work out how to edit the ‘onClosed’ event, similar to what your answer has suggested.



Hi @Savage,

Here is an older community thread related to your question.

You can find some example scripts there and adjust based on your particular case.


Hi @Hristian

Perfect, thanks very much.


Hey @Savage you are correct, was just an example :slight_smile: But, I see @Hristian has provided and answer as well, I hope this has done the job.