"dropdown1"
"button1"
Index
CODE
import wixLocation from "wix-location";
$w.onReady(function () {
});
export function button1_click(event) {
let option = $w("#dropdown1").selectedIndex
console.log(option)
if ( option === 0 ) {wixLocation.to("https://www.owheeler.com/about");}
else if ( option === 1 ) {wixLocation.to("https://www.owheeler.com/home");}
else if ( option === 2 ) {wixLocation.to("https://www.ebay.com");}
else if ( option === 3 ) {wixLocation.to("https://www.amazon.com");}
else if ( option === 4 ) {wixLocation.to("https://www.wix.com");}
}
CODE
export function dropdown2_change(event) {
let currentIndex = $w('#dropdown2').selectedIndex
$w('#dataset8').setCurrentItemIndex(currentIndex)
setTimeout(()=>{
console.log(currentIndex)
let selectedState = $w('#dataset8').getCurrentItem().state
console.log(selectedState)
$w('#button11').label = selectedState
})
$w('#button11').link = $w('#dataset8').getCurrentItem().webLink
}
CODE
export function dropdown3_change(event) {
let url = $w("#dropdown3").value;
$w("#button3").link = url
$w("#button3").target = "_blank";
}
export function button3_click(event) {
console.log($w("#button3").link)
}