Stupid IE (2)

To create a multiple select-box with javascript you need a very ugly hack in IE.

if (navigator.appName.match(/Internet Explorer/)) {
	fsel = document.createElement(\'<SELECT MULTIPLE>\');
} else {
	fsel = document.createElement(\'select\');
	fsel.multiple = true;
}

2 thoughts on “Stupid IE (2)”

  1. Of course you could also try the less ugly hack using IE’s conditional comments. It may require you to write IE code in a separate file, though.

Leave a Reply

Your email address will not be published. Required fields are marked *