[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.8

Saving data entered into a textInput component

Asked by gemarti in Adobe Flash

Tags: flash, example, textinput

I am creating a Flash Form Application. I have three forms with various components that are populated by ASP scripts. Some fields on the forms need to be mannually filled out by the user. I want to validate the data before it is saved to the database. I have noticed that text fed into the fields from the ASP script are not problem but if I type text into a field (textInput component) and then click a button (i.e. submit button) the data doesn't seem to exist.

Here is a working example:

Create a new Flash Form Application (FLASH MX 2004 Professional)
Create one additional form beneath the default "application" form. You should have form1 and form2 as well as the main "application" form.
On form1 place a TextInput Component. Give it an instance name time_ti
On form2 place a Button Component. Give it an instance name submit_btn

On form1 create a new layer in the time line. Call it Actions. Lock the layer.
Open the actions panel and enter the following script:

//begin script
//time_ti listener
timeTextListener = new Object();
timeTextListener.handleEvent = function(evt) {
      if (evt.type == "enter") {
            trace("You have entered some text");
            trace("Length: " + time_ti.length);
            trace("Text: " + time_ti.text);
      }
};
time_ti.addEventListener("enter", timeTextListener);


//submit_btn on click
function click(evt) {
      trace("Length: " + this.time_ti.length);
      if (this.time_ti.length== 0) {
            trace("Text: " + this.time_ti.text);
            trace("You did not enter a time!");
      } else {
            trace("Length: " + this.time_ti.length);
            trace("There is a time in the field");
      }
}
this._parent.form2.submit_btn.addEventListener("click", this);

//end script


However, on the form I am working with the return information for the script above is:

++++++++++++++++RETURN DATA IN PROBLEM APPLICATION++++++++++++++++++++++++++++
//text returned when enter key is pressed on the keyboard after adding data to the text_ti TextInput component.
You have entered some text
Length: 4
Text: 1600

//text returned after pressing submit_btn.
Length: 0
Text:
You did not enter a time!


Can anyone tell me why I can't see what was entered when I click the submit button?
[+][-]01/06/06 06:54 AM, ID: 15629130Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Adobe Flash
Tags: flash, example, textinput
Sign Up Now!
Solution Provided By: blue-genie
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-89