0 Replies Latest reply on Aug 13, 2012 2:44 AM by EHVR

    the javascript code is not working.

    EHVR

      Hi ,

        I tried to disable a text field by using the following code. I am able to disable the field, but the field  is still allowing to enter data in disable mode also.

      The code I used is:

      var curr_state = thisItem.getProperty("state");
        var correction = getFieldByName("correction");
      if(curr_state=="New")

      {

        if(correction)
      {

      var correction_Style = correction.style;
         correction.disabled = true;
         correction_Style.visibility = "visible";
         correction_Style.display = "";

      }

      else{

      correction.disabled = false;

      }

      }

      Is there  any mistakes in the above code?

      Need help.

      Thank you all,

      Harsha