top of page

Website-Navigation

CLOSE.png
Go to website...
CODE

"dropdown1"

"button1"

Index

CODE

CLOSE.png

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");}

}

Example-2

CLOSE.png

The dropDown is populated by the existing database (States) without CODE.

Go to website...

CODE

CLOSE.png

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

 }

Example-3

CLOSE.png

The dropDown is populated by the existing database (States) without CODE.

Go to website...

CODE

CLOSE.png

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)

}

bottom of page