0 Replies Latest reply on Sep 12, 2010 9:00 PM by ericm99

    disable text field until another field has text in it


      I have two text fields, and each has it's own button that when pressed enters the current date/time in it's text field. The first is a start time, the second a stop time. I want the stop time text field (or button) to return an error message if the start time has not been entered yet.


      The basic script I am using for each button is:


      var fld = this.getField("STOPTIME");


      fld.value = util.printd("yyyymmdd/HHMM",new Date());


      I have tried using an if/else with a "read only" modifier, like:


      if (this.rawValue == 1){


           STOPTIME.access = "readOnly"


      } else {


           STOPTIME.access = "";




      ...but I either incorporated it wrong or it's the wrong script to use altogether, but I'm not sure, and I'm a scripting nube.


      Any suggestions?