How can change the page URL with a button with switching to that page
I have a button on my site which filters results based on location & I have one more page which is filtered by a specific location.
What I want to do is that when I click on a button it filters it changes the page URL based on that page which is filtered by specific location
This is my code which filters location. but I don’t know how to write a code to change the URL of the page with being on the same page.
export function Location_click(event) {
//Add your code for this event here:
$w(“#PreloaderBox”).show();
console.log(“firtering item to Resonance”);
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘location’, ‘Location Name’))
. catch ((error) => {
let errorMsg = error.message;
let code = error.code;
} );
}