Estoy intentando descubrir por qué no funciona en IE...
Código PHP:
<select multiple="multiple" onclick="handler(this)" size="5">
<option>Uno</option>
<option>Dos</option>
<option>Tres</option>
<option>Cuatro</option>
<option>Cinco</option>
</select>
<script>
/*
function e(q,noBr) {
document.body.appendChild( document.createTextNode(q) );
if(!noBr) document.body.appendChild( document.createElement("BR") );
}*/
function handler(sel) {
var opt=sel.options[sel.options.selectedIndex];
if( opt.getAttribute("seleccionado")!= "si" )
opt.setAttribute("seleccionado","si");
else
opt.setAttribute("seleccionado","no");
for( var i=0; i<sel.options.length; i++)
if( sel.options[i].getAttribute("seleccionado")=="si" )
sel.options[i].selected=true;
else
sel.options[i].selected=false;
return false;
}
</script>
Si lo ves me dices.. esto frustra mucho.