2 Replies Latest reply on Sep 28, 2010 7:28 AM by mustafa41

    Enabling-disabling objects

    mustafa41

      i have a form which consists of several checkboxes and text or numeric fields. i want checkboxes to control the visibility of the other fields. i use the following script:

       

      ygh.#subform[0].checkBox1::change - (JavaScript, client)
      if(this.rawValue==0)
        numericField2.presence="invisible";
      else
        numericField2.presence="visible";

       


      it works fine... but initial page comes with fields that are all enabled. according to the checkbox changes, they respond, but i want to see them disabled on the first screen.

       

      by the way, when i change the visibility option to "Invisible" in the object->Field tab, it succeeds but then the script does not work at all.

       

      any solutions or offers will be appreciated.

       

      thanks in advance.

       

      MC