<br************@hotmail.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
I do not want to disable a dropdown list, I want the selection to stay
on the same selection even if a user changes the option. I think I
need
to trap mouseup and keyup or something, but I am not sure, all
direction appreciated.
Thanks.
<body onload="setBack(document.forms['myForm'].elements['mySelect']);">
<form name="myForm">
<select name="mySelect" onchange="setBack(this);">
<option>One</option>
<option selected="selected">Two</option>
<option>Three</option>
</select>
</form>
<script type="text/javascript">
function setBack(sel)
{
if ('number' == typeof sel.previousIndex)
{
sel.selectedIndex = sel.previousIndex;
}
else
{
sel.previousIndex = sel.selectedIndex;
}
}
</script>
--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq