<p>I have a JavaScript snippet that runs very well on Firefox and Safari, but refuses to run on IE:</p>

<pre><code>var drop= function(id)
{
   if(document.getElementById("select1").value == "Ficha de pediatria"){
    top.location.href = "print.jsp?id="+id+"&amp;type=2";
   }
   else if(document.getElementById("select1").value == "Ficha normal"){
        top.location.href = "print.jsp?id="+id+"&amp;type=1";
   }
}

&lt;select id="select1" name="select1" onChange="drop(id);return false;"&gt;
&lt;option&gt;Imprimir:&lt;/option&gt;
&lt;option&gt;Ficha de pediatria&lt;/option&gt;
&lt;option&gt;Ficha normal&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>I trimed this as it had more JSP code but it' remained the same. Anyone got any idea why it's not running on IE?</p>

[EDIT]  Sorry.  I introduced an error with my first post by not carefully looking at how you are constructing your url.  I shouldn't have removed the
```
id
```
parameter.  I've updated the code and it should work now.
Try this instead:
```
```
function drop(ctl,id)
{
   var value = ctl.options[ctl.selectedIndex].value;

   if(value == "Ficha de pediatria"){
       window.top.location.href = "print.jsp?id="+id+"&type=2";
   }
   else if (value == "Ficha normal"){
       window.top.location.href = "print.jsp?id="+id+"&type=1";
   }
}

<select id="select1" name="select1" onChange="drop(this,id);return false;">
<option>Imprimir:</option>
<option>Ficha de pediatria</option>
<option>Ficha normal</option>
</select>
```
```
[EDIT] A bit of explanation...
I think the issue is how it is accessing the DOM.  I don't think that IE has a value property on a select.  I think you have to get at it via the selected option.  Also, I'm not sure that there is a top property in the global namespace, but you should be able to get at it via
```
window.top
```
to set the location.  Finally, I made a slight improvement in that by specifying
```
this
```
as the argument, you can skip the element lookup and reference it directly from the control passed as the argument.