I used the Redirect users using Dropdowns in Wix Code off the WixShow youtube to build a dropdown with links.
I am trying to have 2 different dropdown lists redirect to other pages.
I have one working, but I cannot figure out how to get a second working without errors.
Thank You, and I am defiantly low on the knowledge pole.
“link” would be filled in with URL
import wixLocation from 'wix-location';
$w.onReady(function () {
$w("#breakout1").options = [
{"label": "Link 1", "value": "link"},
{"label": "Link 2", "value": "link"},
{"label": "Link 3", "value": "link"},
{"label": "Link 4", "value": "link"},
{"label": "Link 5", "value": "link"},
{"label": "Link 6", "value": "link"},
{"label": "Link 7", "value": "linkm"},
{"label": "Link 8", "value": "link"}
];
$w("#peertopeer1").options = [
{"label": "Link 1", "value": "link"},
{"label": "Link 2", "value": "link"},
{"label": "Link 3", "value": "link"},
{"label": "Link 4", "value": "link"},
{"label": "Link 5", "value": "link"},
{"label": "Link 6", "value": "link"},
{"label": "Link 7", "value": "link"},
{"label": "Link 8", "value": "link"}
];
});
export function breakout1_change (event) {
let gotoURL = $w("#breakout1").value;
wixLocation.to(gotoURL);
}
export function peertopeer1_change(event) {
let gotoURL = $w("#breakout1").value;
wixLocation.to(gotoURL);
}