# ComboBox with URL Jump

**URL:** <https://forum.kirupa.com/t/combobox-with-url-jump/238149>\
**Category:** flash\
**Created:** [September 7, 2007, 4:14pm UTC](https://forum.kirupa.com/t/combobox-with-url-jump/238149 "2007-09-07T16:14:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![orionstar](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@orionstar](https://forum.kirupa.com/u/orionstar)\
**Post date:** [September 7, 2007, 4:14pm UTC](https://forum.kirupa.com/t/combobox-with-url-jump/238149/1 "2007-09-07T16:14:31Z")

</div>

Hey guys.  
Been tasked to create a site with a dropdown box with links to other pages using a combobox. I have not yet got up to speed with AS3 ( wow, it’s gonna take me some studying ). So for the meantime I am using what I know.  
Anyhow I found geat code from lunatic here:  
[http://www.kirupa.com/forum/showthre…t=combobox+url](http://www.kirupa.com/forum/showthread.php?t=56324&highlight=combobox+url)  
all works fine except for the fact that clicking on any of the boxes on the combobox does nothing where it should be going to a url.

I scoured kirupa, I scoured my training cds and googled it, I can’t find a solution except for an AS3 one.

Any help would be so greatly appreciated!

Cheers!

Orionstar

[COLOR=Black] **Lunatic’s Code.** [/COLOR][SIZE=1][COLOR=Black]( thanks Lunatic )[/COLOR][/SIZE]

```auto
[COLOR=#000000] **function** [/COLOR] getLink[COLOR=#000000]([/COLOR]c[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
    [COLOR=#000000] **var** [/COLOR] linkname = c.[COLOR=#000080]getSelectedItem[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR].[COLOR=#0000ff]data[/COLOR];
    [COLOR=#0000ff]getURL[/COLOR][COLOR=#000000]([/COLOR]linkname, [COLOR=#ff0000]"_blank"[/COLOR][COLOR=#000000])[/COLOR]
[COLOR=#000000]}[/COLOR]

[COLOR=#000000] **var** [/COLOR] data_array = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]Array[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#808080]*// first item*[/COLOR]
data_array[COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR] = [COLOR=#000000]{[/COLOR]label:[COLOR=#ff0000]"Kirupa"[/COLOR], [COLOR=#0000ff]data[/COLOR]:[COLOR=#ff0000]"http://www.kirupa.com"[/COLOR][COLOR=#000000]}[/COLOR];
[COLOR=#808080]*// second item*[/COLOR]
data_array[COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR] = [COLOR=#000000]{[/COLOR]label:[COLOR=#ff0000]"Flashkit"[/COLOR], [COLOR=#0000ff]data[/COLOR]:[COLOR=#ff0000]"http://www.flashkit.com"[/COLOR][COLOR=#000000]}[/COLOR];
[COLOR=#808080]*// third item*[/COLOR]
data_array[COLOR=#000000][[/COLOR][COLOR=#000080]2[/COLOR][COLOR=#000000]][/COLOR] = [COLOR=#000000]{[/COLOR]label:[COLOR=#ff0000]"Google"[/COLOR], [COLOR=#0000ff]data[/COLOR]:[COLOR=#ff0000]"http://www.google.com"[/COLOR][COLOR=#000000]}[/COLOR];
[COLOR=#808080]*// set data provider*[/COLOR]
links.[COLOR=#000080]setDataProvider[/COLOR][COLOR=#000000]([/COLOR]data_array[COLOR=#000000])[/COLOR];
[COLOR=#808080]*// set change handler*[/COLOR]
links.[COLOR=#000080]setChangeHandler[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"getLink"[/COLOR][COLOR=#000000])[/COLOR];

```
