How to run code from one page, on another

Hi, I was having trouble trying to run some search function against a dataset code from a light box, onto another corresponding page. I have a button on the page that opens a light box that has user inputs. Based on these user inputs I want a repeater on the other page to yield results based on the information entered in the user inputs in the light box once the close button is clicked. I have tried putting this code onto the site page to no avail. Thanks! code #page #button #userinputs

This is my search function code on the light box page:
Here is the URL to the parent page to help with confusion:
https://www.eventfulplace.com/featured-events

import wixData from ‘wix-data’;

export function FfilterButton_click(event) {

wixData.query('paymentForm01') 
    .contains('shortTextField',$w("#FinputName").value) // Searches by event name 
    .contains('dropdownField22',$w("#FinputType").value) // Searches by event type 
    .contains('shortTextField2',$w("#FinputLocation").value) // Searches by event location 
    .contains('shortTextField3',$w("#FinputTime").value) // Searches by event time 
    .find() 
    .then((results)=>{ 
        $w("#Frepeater1").data = results.items // Does not display in the repeater on the parent page        

});
}

When you open a lightbox using the openLightbox() function, you can pass an object containing data to be used in the lightbox. In the lightbox’s code, you call the getContext() function to retrieve the data sent by the openLightbox() function.

When you close the lightbox using the close() function, you can pass an object containing data to be used by the page that opened the lightbox.

This data is retrieved from the resolution of the Promise returned by the openLightbox() function.
Check out the reference for lightbox: https://www.wix.com/corvid/reference/wix-window.lightbox.html

Alright, I will try that out, thank you!