Hi,
A complete novice here so go easy
I’ve spent a few days watching tutorials, reading the forum and trying to do a very simply task but I keep misunderstanding and finding my results confusing. So I need this to be explained in layman’s terms, as quite frankly I am very thick.
I want to create a drop down that then when the website is selected takes you to that url in datasheet that corresponds.
I have this working, however it will only display the first website in the dataset.
My dodgy code:
import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;
$w.onReady( function () {
});
export function dwebsitedropdown_chang(event, $w) { $w(“#websitedata”).setCurrentItemIndex(event.target.selectedIndex) }
export function websitedropdown_change(event, $w) {
{ wixLocation.to($w(“#websitedata”).getCurrentItem().url); }
}
website dataset with my two example url:
I would really appreciate any help or advice, as this is keeping me awake at night as I cannot work it out for the life of me !
Thank you guys