Ignore DropDown Change?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bradwiseathome@hotmail.com

    Ignore DropDown Change?

    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.

  • Grant Wagner

    #2
    Re: Ignore DropDown Change?

    <bradwiseathome @hotmail.com> wrote in message
    news:1109698912 .812100.70180@l 41g2000cwc.goog legroups.com...[color=blue]
    >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.[/color]

    <body onload="setBack (document.forms['myForm'].elements['mySelect']);">
    <form name="myForm">
    <select name="mySelect" onchange="setBa ck(this);">
    <option>One</option>
    <option selected="selec ted">Two</option>
    <option>Three </option>
    </select>
    </form>
    <script type="text/javascript">
    function setBack(sel)
    {
    if ('number' == typeof sel.previousInd ex)
    {
    sel.selectedInd ex = sel.previousInd ex;
    }
    else
    {
    sel.previousInd ex = sel.selectedInd ex;
    }
    }
    </script>

    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq


    Comment

    • bradwiseathome@hotmail.com

      #3
      Re: Ignore DropDown Change?

      Perfect. Thanks!

      Comment

      Working...