Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

tab to next component textfield

Posted on 2006-10-19
1
Medium Priority
?
174 Views
Last Modified: 2010-04-03
I have 4 component textboxes and when the user enters in 4 characters in each textfield, I want to tab to the next textfield.  How would you do that?   Also, how can I convert what the user is typing into all caps (numbers would also be included)?
0
Comment
Question by:COwebmaster
1 Comment
 
LVL 39

Accepted Solution

by:
blue-genie earned 2000 total points
ID: 17772158
Hi, a nice tidy way to do it would be in an array, for this example i'm using a button to call the function, i'm assuming you're not want to be lstening the whole time for textfield changes.

var textboxesArray:Array = new Array("textbox1", "textbox2", "textbox3", "textbox4"); //parse the instance names of your textboxes.
function doIt() {
      trace(textboxesArray.length+"test");
      for (var i = 0; i<textboxesArray.length; i++) {
            eval(textboxesArray[i]).tabEnabled = true;
            eval(textboxesArray[i]).tabIndex = i+1;
            var textBoxValue:String = eval(textboxesArray[i]).text;
            trace(textBoxValue.toUpperCase()); //this is the upper case bit.
      }
}
test_btn.onRelease = function() {
      doIt();
};
 

i have tested teh code and it works.
blu.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question