Dropdown Box & URL Button Linked (Database)

Hi Sam

Thanks for the response.

I’ve attached your code to my drop down and i keep getting the following error messages:

There was an error in your script
TypeError: n is not a function

The dropdown is called ‘dropdown1’ and the dataset is called ‘dataset1’:

import wixLocation from 'wix-location';

export function dropdown1_change(event, $w) {
	$w("#dataset1").setCurrentItemIndex(event.target.selectedIndex)
		.then( () => {
			wixLocation.to($w("#dataset1").getCurrentItem().url);
		} );
}

Any idea what may be wrong?

Kind regards

Thomas