IE select onchange issue

This is a quick tip on how to support the onChange behavior for a select box in IE8.

For some reason IE 8 does not handle the onChange attribute of a select box.

<select name="bowsers" id="browsers" onChange="alert('test');">





Here is a fix than can be used to make this working

<select name="bowsers" id="browsers">





<script type="text/javascript">
var selectmenu = document.getElementById("browsers");

selectmenu.onchange = function()


2 Responses


this does not work!


Just what I needed. Thanks man!

Leave Your Response

* Name, Email, Comment are Required