wilberforce2
IS-IT--Management
Gurus
Could someone have a quick look at this function and explain why it is not working in firefox. I have tried it in IE and safari and it works fine.
Many thanks.
Could someone have a quick look at this function and explain why it is not working in firefox. I have tried it in IE and safari and it works fine.
Code:
<HTML>
<script language="javascript">
function mo(obj)
{
if((obj.offsetWidth-event.clientX)<10)return
var o;
var s= Math.round(event.offsetY / (((o=document.getElementById("test")).offsetHeight-6) / o.size));
obj.selectedIndex=s;
//document.getElementById("say").innerHTML = s;
document.getElementById("say").innerHTML = document.getElementById("test").options[s].text
}
</script>
<form>
<select id="test" size=3 onmousemove="mo(this);">
<option>one</option>
<option>two</option>
<option>three</option>
<option>four</option>
</select>
<div id="say"></div>
</form>
</HTML>
Many thanks.