1 Reply Latest reply on Sep 29, 2010 10:55 AM by hollow

    combobox readonly

    ajanz

      hi,

       

      i need to set the combobox readonly. no joke, i can't use disabled because in internet explorer there's no chance to change font color of an disabled text box.

       

      i tried onClick="return false;" but does not work.

       

      could someone help?

        • 1. Re: combobox readonly
          hollow

          function freezeList(whichList){
          var array_selected = new Array();
          for (i=0; i<whichList.options.length; i++) {
          if (whichList.options[i].selected){
          array_selected.push(whichList.options[i].value);
          }
          }
          whichList.onchange=function(){
          for (i=0; i<whichList.options.length; i++) {
          whichList.options[i].selected=false;
          for (j=0; j<array_selected.length; j++) {
          if (array_selected[j]==whichList.options[i].value){
          whichList.options[i].selected=true;
          }
          }
          }

           

          }
          whichList.className="greyed";
          }

           

           

          onmouseover="freezeList(this.form.elements['readList[]'])">