title: JQuery/Javascript - Drop Down List get info from another Drop Down
body: <p>I have 2 drop downs. In the first one you choose a model, in the second a specific model. 
  <a href="http://jsfiddle.net/QskM9/" rel="nofollow">http://jsfiddle.net/QskM9/</a></p>
  
  <p>For example: </p>
  
  <pre><code>drop down 1: 
  Nokia 
  Samsung
  Apple -if this is selected, the second drop down shows:
  
  Drop down 2:
  iPhone 3
  iPhone 3Gs
  iPhone 4 -When this is selected, go to www.apple.com (for example)
  </code></pre>
  
  <p>I've been trying this the whole day and cant seem to make this work.
  This is what I've got so far:</p>
  
  <pre><code>// HTML
  &lt;form method="get" name="box"&gt;
  &lt;select id="opsaetning" name="opsaetning" onchange="changelist(this)"&gt;
  &lt;option selected="selected"&gt;Model&lt;/option&gt; 
  &lt;option label="Apple"&gt;Apple&lt;/option&gt;
  &lt;option label="Nokia"&gt;Nokia&lt;/option&gt;
  &lt;option label="Samsung"&gt;Samsung&lt;/option&gt;
   &lt;/select&gt;
  
   &lt;select id="model" name="model" onchange="document.location=$(this).val();"&gt;
  &lt;option value="www.apple.com" selected="selected"&gt;iphone 4&lt;/option&gt; 
   &lt;/select&gt;
   &lt;/form&gt;
  
  //SCRIPT
  &lt;script type="text/javascript" language="javascript"&gt;
          var lists = new Array();
          // Apple
          lists['Apple'] = new Array();
          lists['Apple'][0] = new Array(
          'Forbered Gmail til mobilen');
  
          lists['Apple'] = new Array(
          'www.apple.com/ihphone3g',
          'www.apple.com/iphone4');
  
          function changelist(){
          list = lists[box.options[box.selectedIndex].value];
          sletListe(box.form.model);
          fyldListe(box.form.model, list);
          }
  
          function sletListe(box){
          while(box.options.length)box.options[0] = null;
          }
  
          function fyldListe(box, lists){
              for(i=0; i&lt; arr[0].length; i++){
                  option = new Option(arr[0][i], arr[l][i]);
                  box.options[box.length] = option;
              }
              box.selectedIndex=0;
          }
  &lt;/script&gt;
  </code></pre>
  
  <p>Can anyone help me get it working? Note I can't use PHP, .NET, Perl etc. only HTML and js/jq.</p>