# Linking url's to dropdown menu options

**URL:** <https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [November 2, 2018, 3:25am UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162 "2018-11-02T03:25:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![profyco](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@profyco](https://forum.wixstudio.com/u/profyco)\
**Post date:** [November 2, 2018, 3:25am UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/1 "2018-11-02T03:25:53Z")

</div>

Hi! I’m trying to link the dropdown menu options to different pages on my wixsite. The problem I encounter is that it only goes to the pages after the second time I change an option.

For example: the values in the dropdown are:

- “French”
- “English”
- “German”

(All three are linked to a different wix page.)

whenever I change to for example: “English” , nothing happens..  
When I then change to “french”, “English” opens..

It looks like it only works on the second click. Here is the code that I used. Does anybody know what is going wrong here? Thanks a lot!

export function dropdownLanguage\_change(event) {  
//Add your code for this event here:  
let filterLanguage = $w(‘#dropdownLanguage’).value;

```
$w('#dropdownLanguage').onChange(() => { 

```

if (filterLanguage === ‘frances’) {  
wixLocation.to(“/frances”);  
}  
if (filterLanguage === ‘aleman’) {  
wixLocation.to(“/Aleman”);  
}  
if (filterLanguage === ‘espanol’) {  
wixLocation.to(“/Espanol”);  
}  
if (filterLanguage === ‘ingles’) {  
wixLocation.to(“/Ingles”);  
}  
if (filterLanguage === ‘otrosidiomas’){

```
        wixLocation.to("/OtrosIdiomas"); 
    }} 
    ); 
}

```

---

<div class="post-metadata">

**Author:** ![andreas-kviby](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/andreas-kviby/32/790_2.png) [@andreas-kviby](https://forum.wixstudio.com/u/andreas-kviby)\
**Post date:** [November 2, 2018, 11:48am UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/2 "2018-11-02T11:48:16Z")

</div>

So what is the first label in the dropdown? Do you have one and do the values of the dropdown correspond to the correct statements in the IF. You do not show the values in your dropdown.

---

<div class="post-metadata">

**Author:** ![profyco](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@profyco](https://forum.wixstudio.com/u/profyco)\
**Post date:** [November 2, 2018, 3:30pm UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/3 "2018-11-02T15:30:52Z")

</div>

Hi Andreas, Thanks for your answer. Here are the values I set for the dropdown. Does it have to be in order?

 ![](https://us1.discourse-cdn.com/wix/original/3X/e/f/efd8c33dbdf27c6c82b38c967ea9237f1d7aa8b6.jpeg)

---

<div class="post-metadata">

**Author:** ![andreas-kviby](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/andreas-kviby/32/790_2.png) [@andreas-kviby](https://forum.wixstudio.com/u/andreas-kviby)\
**Post date:** [November 2, 2018, 3:47pm UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/4 "2018-11-02T15:47:27Z")

</div>

Ah you have two dropdown events inside each other, take away the inner one

---

<div class="post-metadata">

**Author:** ![profyco](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@profyco](https://forum.wixstudio.com/u/profyco)\
**Post date:** [November 2, 2018, 4:15pm UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/5 "2018-11-02T16:15:24Z")

</div>

@andreas-kviby Thanks!! Now it works perfectly.

---

<div class="post-metadata">

**Author:** ![andreas-kviby](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/andreas-kviby/32/790_2.png) [@andreas-kviby](https://forum.wixstudio.com/u/andreas-kviby)\
**Post date:** [November 2, 2018, 5:10pm UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/6 "2018-11-02T17:10:05Z")

</div>

@profyco great! Please mark it as top comment as it helps me

---

<div class="post-metadata">

**Author:** ![vaughan-f-l-dagnell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/vaughan-f-l-dagnell/32/31791_2.png) [@vaughan-f-l-dagnell](https://forum.wixstudio.com/u/vaughan-f-l-dagnell)\
**Post date:** [January 19, 2022, 2:08pm UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/7 "2022-01-19T14:08:28Z")

</div>

Hi Folks,  
I’m not a wiz at code and would love some guidance on how to add a button to my Wix page that has a drop down menu with links to other pages on my wix site.

Any and all advice most gratefully received!

🙂

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [January 19, 2022, 3:10pm UTC](https://forum.wixstudio.com/t/linking-urls-to-dropdown-menu-options/15162/8 "2022-01-19T15:10:46Z")

</div>

To learn about programming with Velo, read the following articles that will help you start working with Velo:

- [About Velo by Wix](https://support.wix.com/en/article/about-corvid-by-wix) - what Velo is and what features it has.

- [Getting Started with Velo by Wix](https://support.wix.com/en/article/getting-started-with-corvid-by-wix) - step-by-step tutorial on how to start using Velo.

- [Onboarding to Velo by Wix](https://support.wix.com/en/article/onboarding-to-corvid-by-wix) - introduction to Velo with short tutorials.

This is an old post and is being closed.
