2 Replies Latest reply on Nov 19, 2012 3:28 AM by liumin hu

    h:inputTextarea resizeable

    mabu2 Newbie

      Hi,

       

      when I use h:inputTextarea in richfaces context, the resulting form field is resizeable. How do I prevent the field to be resizeable? What is to do, to allow only vertical resizing.

      How to define min resp. max values for the size?

       

      regards

      Matze

        • 1. Re: h:inputTextarea resizeable
          Siva P Master

          Hi,

          try like,i think you dont have any min max value like textbox.

           

          <h:inputTextarea id="txtAreaStream" value=" " onkeyup="limitTextArea(this,255);" onkeydown="limitTextArea(this,255);"> 

          </h:inputTextarea>

          <script>

          function limitTextArea(element, limit){

          if (element.value.length > limit){

          element.value = element.value.substring(0, limit);

          }

          }

          </script>

           

          Or else

          try implement jquery for the text box.

           

          Thanks,

          Siva

          • 2. Re: h:inputTextarea resizeable
            liumin hu Master

            hi,

             

            if you are under firefox, use textarea {resize:none} in your css.

             

            there are some others attributes too.