//Page-A-CODE...
import {local} from 'wix-storage';
$w.onReady(()=>{console.log("My page-A is ready now.");
//defining the data for command and used element to be changed on page-B...
let data = JSON.stringify({
element: "text170",
command: "show",
});
console.log("Needed DATA prepared and defined: ", data);
//Concerting the data to a STRING-OBJECT & and storing it in Wix-Storage...
local.setItem("key1", data); console.log("Needed data is now stored in Wix-Storage! Continue on page-B!");
});
//Page-B-CODE...
import {local} from 'wix-storage';
import wixLocation from 'wix-location';
$w.onReady(()=>{console.log("My page-B is ready now.");
//recieving DATA from Wix-Storage & parse it back to an --> OBJECT...
let data = JSON.parse(local.getItem("key1")); console.log("Recieved-Data from Wix-Storage prepared to be used: ", data);
console.log("Command: ", data.command);
console.log("Element: ", data.element);
//command in action --> hiding/showing/collapsing/expanding or what ever the wished element on your page-B...
$w(`#${data.element}`)[data.command]();
//continue here your redirection-process....
// DO YOU NEED AN IF-ELSE-STATEMENT to check for something?
/*
if () {}
else {}
*/
wixLocation.to("/plogin")
});
Your last step you will do on your own.
You have now enough informations to get it to work.
If you still have problems → take a look into the VELO-API-DOCs.
Good luck !
And do not forget to like it, if you really liked it ![]()