URL Redirects & Velo Javascript

My question woulbe if there is a systematical URL-CHANGE between old and new URL ?

If there is a possibility to generate a systematical URL-CHANGE, you maybe even do not need a page-refresh.

Only you know the difference between OLD and NEW URL.

If you again would take a deeper look onto my provided example-site, you would find someting like…

$w(‘#productPage1’).onMouseIn(()=>{start_Process();});

…or if you take a look here…

…you will find something like…
$w(‘#checkbox1, #checkbox2’).onChange(()=> {check_Checkboxes();});

You already recognize what i want to tell you ?

What about —>

$w('#CLICKED-ELEMENT-ID-HERE').onClick(()=> { .........what should happen now...........});

Your CONSOLE-LOGS do start with → PAGE-LOAD.
Now you need to generate an → INTERACTION <— so you click on something → to start a process.

So you surely want to click onto the PRODUCT or a BUTTON → What is the ELEMENT-ID of it? Paste the ID into the code and start a function…–> function → xxxxx();

$w('#CLICKED-ELEMENT-ID-HERE').onClick(()=> {xxxxx();});

Now generate the function —> What should happen when you click that element?

function xxxxx() {console.log('XXXXX-FUNCTION started....');
    console.log('What should happen next?');
    console.log('Start of REDIRECT...');
    wixLocationFrontend.to(URL);
}

But before you can use it →

a) you need to import the corresponding VELO-MODULE…
—> import wixLocationFrontend from 'wix-location-frontend’; ← will go to the very top of code!!!

b) you will have first to define/declare the URL - variable or constant.

const URL = ‘https://xxxxxx/product/cutting.../whatever…’

Now try to put all together…