I have two select drop down menus. When I select from the first dropdown, then entries in the second dropdown should change. This functionality is working fine in browser, but not in HTA (HTML application)
My Code
<html>
<head>
<script language="javascript">
function change()
{
     var sel=document.getElementById("second")
     var val=document.getElementById("first").value
     if(val=="1")
     {
         sel.innerHTML="<option>a</option><option>b</option>  <option>c</option>"
     }
     else if(val=="2")
     {
          sel.innerHTML="<option>x</option><option>y</option><option>z</option>"
     }
 }  
</script>
</head>
<body>
 <div>
  <select id="first" onchange="change()">
  <option>1</option>
  <option>2</option>
  </select >
<select id="second">
   <option>a</option>
   <option>b</option>
   <option>c</option>
  </select>
 </div>