I have this HTML code at the moment:
Theme
<ul id="dropdown">
    <li> Choose theme
        <ul> 
            <li id="stylesheet1" > <a href="#"> Default </a></li>
            <li id="stylesheet2" > <a href="#"> Theme 1 </a></li>
            <li id="stylesheet3" > <a href="#"> Theme 2 </a></li>
            <li id="stylesheet4" > <a href="#"> Theme 3 </a></li>
        </ul>
    </li>
</ul> 
And in a separate javascript document I have this code:
function initate()
{
document.getElementById("myList").onchange = function() {
   var sheet=document.getElementById("myList").value;
   if(sheet=="one"){
   setActiveStyleSheet("theme1");
   }
   else if(sheet=="two"){
   setActiveStyleSheet("theme2");
   }
   else if(sheet="three"){
   setActiveStyleSheet("theme3");
   }
   else{
   setActiveStyleSheet("default");
   }
   return false
};
}
window.onload = initate;
Now this works good but instead of the dropdown I'm using above I'd like to use this HTML code instead:
Select Theme
<form>
<select id="myList" >
  <option id="stylesheet1">Default</option>
  <option id="stylesheet2">Theme 1</option>
  <option id="stylesheet3">Theme 2</option>  
  <option id="stylesheet4">Theme 3</option>
</select>
<form>
As before I would like to have my event handlers in my separate javascript document. I've tried to replace my javascript into these kind of functions:
document.getElementById("stylesheet1").onchange = function() {
   setActiveStyleSheet("default");
   return false
};
But it doesn't work. How do you correct call functions this way?
 
     
    