2 Replies Latest reply on Aug 19, 2009 6:12 AM by domflexdom

    Loop on element with variables

    domflexdom

      Ok, I have 10 textInputs that are named tiDepart1, tiDepart2, tiDepart3... The only different character is the number of the TI.

       

      So what I want to do is simply have a loop on a random number of these TI and attribute them some properties.

       

      For example :

       

       

       

       

       

      for

       

       

       

      ( i=0 ; i < 6 ; i++ ){

      ddDepart+i.visible=true;

       

      }

       

       

      you can see the little i fitting in the space where the number of the TI should be. So with this command, i manage to set all these elements the property visible at true.

       

      It's a simple and useful command, wich will save me a lot of code if i can manage to make it work.

       

      Is anybody have an idea about how to make this work  ?

       

      I also thought that maybe it would be necessary to put my elements into an array so i can loop on them easily.

      But is it possible to include elements such as a combo box or a text input into an array and still have access to their properties.

       

      Thank you very much and sorry for bad english.

       

      dominic

       

      There's nowhere you can be that isn't where you're meant to be. - the beatles-