# Combobox solution

**URL:** <https://forum.kirupa.com/t/combobox-solution/272820>\
**Category:** Uncategorized\
**Created:** [October 8, 2008, 5:49pm UTC](https://forum.kirupa.com/t/combobox-solution/272820 "2008-10-08T17:49:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andee08](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@andee08](https://forum.kirupa.com/u/andee08)\
**Post date:** [October 8, 2008, 5:49pm UTC](https://forum.kirupa.com/t/combobox-solution/272820/1 "2008-10-08T17:49:08Z")

</div>

Hello everyone,

I am using a dependable combobox with the following options, it works fine.

Could anyone help me to add some script which, upon pressing of a seperate button directs the user to a website, dependent on his specific chosen combination of options?

In this case 3x3 different websites.

carArray = new Array(“Chrysler”,“Porche”,“Mazda”,“Toyota”);  
foodArray = new Array(“Hamburger”,“Hotdog”,“Pizza”);  
drinkArray = new Array(“Water”,“Beer”,“Wine”,“Martini”);  
function setSubCombo() {  
sub\_cb.removeAll();  
var subArray = eval(main\_cb.getSelectedItem().data);  
for(var i=0; i\<subArray.length; i++) {  
sub\_cb.addItem(subArray\*,subArray\*);  
}  
}

your help is much appreciated.
