ELI5: Dropdown Box & URL Button Linked

To preface, I know 0 about any programming languages so I really apologize for asking for a really specific dumbed down question.
I am trying to do the following: A user comes to my site to purchase a product. We have various slightly different products so to narrow down what they want I want to present a dropdown menu. Each dropdown menu option when chosen links to a different product, which is activated when they click ‘Go’.
I am fine with just having dropbown menu link to a URL if linking to a product page is not possible directly (I can just replace the url with the product page url).

This forum post https://www.wix.com/corvid/forum/community-discussion/dropdown-box-url-button-linked-database and this one https://www.wix.com/corvid/forum/community-discussion/drop-down-list-select-and-link-to-page I think have the solution somewhere but I don’t know what to do with any of the code or what to replace in the code.

This is what I currently Have

However, I’m lost after this. Any help is really appreciated

You should have a read of theses page:
https://support.wix.com/en/article/corvid-working-in-the-code-panel
https://support.wix.com/en/article/working-with-corvid-examples

Then go back to your previous forum post that you linked to above:
https://www.wix.com/corvid/forum/community-discussion/dropdown-box-url-button-linked-database

Finally follow and use the code that is given in the replies to that previous forum post as Sam (Wix Mod) shows you how to do it all wrapped up in one, plus Thomas shows you how to do it using two separate functions with dropdown change first and then the button click and link to current dataset url.

I figured out what was wrong. My data base settings were on read-only, it turns out it must be read+Write. I’m going to leave this comment up thought incase anyone else comes across this and has same problem. Below was my problem

I’ve tried to recreate that thread but it doesn’t seem to work. This is my code

This is on button

This is on dropdown

This is my data set

This is how it’s set up

This is end result

Check that your dataset permissions are not setup as write only as if you check the API info it does state that ‘Calling setCurrentItemIndex() on a write-only dataset causes the Promise to reject.’
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setCurrentItemIndex

You can ignore the other part where it says that the dataset needs to be loaded before you call it’s setCurrentItemindex, however that would only apply if you are making that call within the onReady call at the start and you are not.

Using the code that Thomas suggests with the onClick function separate, it should be as this:

import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;

$w.onReady(function () {
});

export function dropdown1_change(event, $w) {
$w(“#dataset1”).setCurrentItemIndex(event.target.selectedIndex)

}
export function button5_click(event, $w) {
wixLocation.to ($w(“#dataset1”).getCurrentItem().urls);
}
// Make sure that you have added the onChange and onClick events to the dropdown and button respectively in the properties panel.

Or if you use Sam’s code example, then it should be as this:

import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;

$w.onReady(function () {
});

export function dropdown1_change(event, $w) {
$w(“#dataset1”).setCurrentItemIndex(event.target.selectedIndex)
.then( () => {
wixLocation.to ($w(“#dataset1”).getCurrentItem().urls);
} );
}
// Make sure that you have added the onChange event to the dropdown in the properties panel.