Getting the text field value?

How can I get the value entered into the field of action tf_1?

Let's say I'm going to number 5 in the text field tf_1, how can I receive it for use in the code?five.png

I would like to store that value in the variable, so that I can work with him in a function.

Can someone help me? I am already grateful!

var num:Number;

calcular.addEventListener (MouseEvent.CLICK, resolver);

function resolver(Event:MouseEvent): void {}

NUM = Number (tf_1.text);

If (num/400 = 0) {}

trace ("Yes!");

}

}

Tags: Adobe Animate

Similar Questions

  • Adding (or divide, multiply, etc.) in the text field values

    Hello world

    I'm trying to calculate values in fields of text entered by the user (who didn't accept numbers) as well as the values selected by the user drop-down list boxes. I have a function to a button:

    reviewQ.calcBtn.addEventListener(MouseEvent.CLICK, calcAns);
    function calcAns(e:MouseEvent):void
    {
         reviewQ.calcAns_text.text = "Your calculated result is " + parseInt(Q1.Q1_text.text) + parseInt(Q2.Q2_cb.selectedItem.data) + parseInt(Q3.Q3_text.text) + parseInt(Q4.Q4_cb.selectedItem.data);
    }
    

    Now, all I get is the actual values entered into the text fields and selected in the drop-down list boxes. How can I get the sum of these values to display on my 'calcAns_text.text '?

    Thank you for your help,

    Rafa.

    You have to build your own filtering for values.  If you think that decimal values, then you will need to plan and test for the presence of a comma in a numeric string and then do not use parseInt(); (what creates an integer value), but use instead Number();  You will need to filter the commas in the numbers in the string before creating the value used for the calculation.

  • Query to get the flex field values description.

    Hello

    Entering invoices-> all the Distributions screen 'Special Mentions for the India' is here. Here we enter the value for the field TDS - tax. I want to get the list of values for TDS - tax in a query.

    Can you please help me.

    Thank you

    Nanga.

    where 'jtc.tax_type =' TDS

    and jtc.section_type = 'TDS_SECTION. '

    and org_id =: inv_sum_folder.org_id

    and jtc.section_code in

    (

    Select section_code

    of jai_ap_tds_th_vsite_v

    where vendor_id =: inv_sum_folder.vendor_id

    and vendor_site_id =: inv_sum_folder.vendor_site_id

    )

    order of jtc.tax_id

  • Get the value of the drop-down list (selectedIndex) and the text field - does not

    Hi all

    I'm trying to find and change the values selected by the user using a drop-down list and text field. Here's the code.

    ChangeRevDetails();
    function ChangeRevDetails(){
    
    
              var myDialog = app.dialogs.add({name:"Enter copyright information"});
    
    
    //    var monthlist = col1.dropdowns.add('myList', undefined, myList);
    
    
              var col1 = myDialog.dialogColumns.add();
              var col2 = myDialog.dialogColumns.add();
      
        col1.staticTexts.add({staticLabel:"Month:"});
              col1.staticTexts.add({staticLabel:"Year:"});
        col1.staticTexts.add({staticLabel:"Rev. no.:"});
        
        var myList = [ "January", "February",  "March", "April", "March", "April", "May", "June", "July", "August", "Sepetember", "October", "November", "December" ];
    
    
         var myMonth = col2.dropdowns.add({stringList:myList, selectedIndex:0, minWidth:100});//{minWidth:100});
         var myYear = col2.textEditboxes.add({editContents:"2013", minWidth:100});   
         var MyRev = col2.textEditboxes.add({minWidth:100});
    
    
        var RevMonth = (myList [myMonth.selectedIndex]);
        var RevYear = myYear.editContents;
        var RevNumber = MyRev.editContents;
        var RevToReplace1 = RevMonth +", "+ RevYear;
        var RevToReplace2 = RevMonth +", "+ RevYear + " Rev. " + RevNumber;
    
    
        var myResult = myDialog.show();
    
    
            if(myYear.editContents == "") //entry is "" 
            { 
            alert("Please enter some text into the contents field."); 
            ChangeRevDetails(); 
            }
            else if(myResult == true) //user entered datas 
            { 
    
    
                alert (RevMonth);
                alert (RevYear);
                alert (RevNumber);
                alert (RevToReplace1);
                alert (RevToReplace2);
    
    
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
    
    
                // grep find/change
                app.findGrepPreferences = app.changeGrepPreferences = null;       
                app.findGrepPreferences.findWhat = "[\\l\\u]+?\\s?\\d{4},?\\s+[\\l\\u]+\\.*\\s+\\d+";
                app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.changeGrepPreferences.changeTo = RevToReplace1;
                app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.activeDocument.changeGrep();
    
    
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
      
        } 
        else //implies user clicked cancel 
        { 
        myDialog.destroy(); 
        }
    
    
    }
    
    

    The problem is, it does not take the value that the user selects in the drop-down list and the text field. It takes the default value as "January" and the year is '2013' as these two values are given as selectedIndex:0 and editContents: "2013". I compared the coding with a few other scripts work as well, but it does not work. I added several alert boxes to check the value we get.

    In addition, search for it and change also does not work. Please help me on this. Thank you.

    Kind regards

    Bachi. D

    Change the order of dialogresults:

    ...

    var myYear = col2.textEditboxes.add ({editContents: "2013", minWidth:100});})
    var MyRev = col2.textEditboxes.add({minWidth:100});)
    Ditto var = myDialog.show ();
        If (myYear.editContents == "") //entry is «»
        {
        Alert ("Please enter a text in the content field.");
        ChangeRevDetails();
        }
        else //user entered if(myResult == true) datas
        {
    var RevMonth = (myList [myMonth.selectedIndex]);
    var RevYear = myYear.editContents;
    var RevNumber = MyRev.editContents;
    "var RevToReplace1 = RevMonth + ', '+ RevYear;

    "var RevToReplace2 = RevMonth + ', '+ RevYear + 'Rev' + RevNumber;

    ...

    did not have a look for the problem of change to find

  • Getting the value of the text field element

    I was wondering if it was possible-

    I have a text field and a "submit" button. In the button submit, I said it to go to a link (i.e. http://www.oracle.com/). I want to take the information that is in the text field and with the URL concatinate (IE if the APEX was in the text field, I want the button submit to take me to http://www.oracle.com/APEX).

    Is this possible?
    If so, how?

    Thank you
    Tom

    Tom:

    Set the URL in the definition of button as

    javascript:redirect('http://www.yahoo.com/' + $v('TEXT_FIELD_NAME') );
    

    CITY

  • Get the text in the Edit field

    Hello

    In my Application, I add a check box and a label field and a field change a grid field Manager. Then this network domain manager, I add several times in Vertical field Manager. So it's looking like list of items. Now, when I checked the box five, trying to get the text of the corresponding edit field.

    This is the code for the domain network manager:

    int c[] = {screenWidth/6, (screenWidth)/3, (screenWidth)/2};
            gm = new GridFieldManager(c, Manager.VERTICAL_SCROLL);
            Logger.out("Grocery", "Here it is coming"+i);
            cbfChecked = new CustomCheckBoxField();
            cbfChecked.setChangeListener(new FieldChangeListener()
            {
                public void fieldChanged(Field field, int context)
                {
                    if(checked[i] == false)
                    {
                        checked[i] = true;
                    }
                    else if(checked[i] ==  true)
                    {
                        checked[i] = false;
                        Logger.out("Grocery", "It is UnChecked" +checked[i]);
                    }
                }
            });
            gm.add(cbfChecked);
            Logger.out("Grocery", "Adding first Label Field");
            LabelFieldCustom lfFrom = new LabelFieldCustom((String) m_vtrItems.elementAt(i),Color.BROWN,FONT_FAMILY_0_SF_AS_16,Field.FIELD_LEFT);
            gm.add(lfFrom);
            Logger.out("Grocery", "Adding second Label Field");
            efcAmount = new EditFieldCustom(Bitmap.getBitmapResource("dob_text_box.png"), 25);
            efcAmount.setMargin(new XYEdges(30, 0, 0, 0));
            gm.add(efcAmount);
            return gm;
    

    Here I add the grid domain manager several times:

    for (int i = 0;i < m_vtrItems.size();i++)
            {
    
                vfm.add(getRow(i));
                vfm.add(new SeparatorField(SeparatorField.NON_FOCUSABLE));
    
            }
    

    Here is the snapshot of my screen:

    Please help me.

    You can access the field by index (prone to errors if).
    or you could save your fields in a data structure, such as a hash table, with the checkboxfield as key to the editfield as value.
    or...

  • Change the display of text field value based on the value (short sample code provided)

    I read around on it for a few days, but I still can't get it works well.

    I have a field of text called "W1SnC1". In fact, I have several domains to execute it. That's why I tried to make the generic script below. Basically, I want to change the properties > form field to "visible but does not print ' if the text field contains ' - '. (As a note side '-' is the default value). I put the script in the following properties > validate > run the custom validation script:

    var elemName = event.target.name;

    If (event.value == '-')

    {

    elemName.display = display.noPrint;

    } else

    {

    elemName.display = display.visible;

    }

    Its odd but once in a while it works :-) I think I must be clicking on something that the queues of validation in these moments. However, I need some general help. Did someone mind giving advice on what to change?

    Try something like this:

    Event.Target.Display = event.value = "-"? display.noPrint: display.visible;

  • How to get the text in a dynamic text field?

    Hello

    I would like to get the text in a text field I have on stage and put it into a string. I do this because I don't don't want to use the table to store each letter I click. Is this possible?

    Concerning

    you don't know.  You can use the text property of your textfield object and store that value in a variable.

    You can use a click on a button to trigger this code or change event of the textfield or any number of other triggers.

  • Value of the text field delete after click

    There is a text field with the value "type your name". When click in the text field, the value will be automatically deleted. We type "Adobe", then click on outside. If you still want to type 'cycle' after 'Adobe' (no delete Adobe or retype "adobe")

    Is this possible? How can I get?

    Hello

    The other way to do this is to go to object > palette on the ground and set a display model of the null state.

    See page 2 of the form example here: http://assure.ly/ewrLMo.

    At its most simple requires no script:

    In our example we have script in events enter and exit to change the police, but this step is entirely optional.

    Hope that helps,

    Niall

  • Cannot get the text in the field description flex

    Hi all

    I try checking if a field flex text value contains anything or not. IE, this flex field is a mandatory field and I need to check when running.
    But I can't get the text value of the descriptive flex field written by the user at run time.

    OADescriptiveFlexBean oadescriptiveflexbean1 = (OADescriptiveFlexBean) webBean.findIndexedChildRecursive ("PerfRatingFlex");
    If (oadescriptiveflexbean1! = null & & oadescriptiveflexbean1.isRendered ())
    {
    String revision = (String) oadescriptiveflexbean1.getAttributeValue ("ATTRIBUTE12");
    }

    I can't retrieve any value of variable revizeNedeni. I tried a few combinations of such use, and I searched the forum for this problem and I tried these suggestions. But I failed.
    Could someone give me some examples of specific code for this?

    Hello

    PerfRatingFlex9__xc_ is not FDF Id field, your identifier is PerfRatingFlex9, just try it with this, you will get the data

    in the page source view, PerfRatingFlex9__xc_ and PerfRatingFlex9, both displayed against the identification sticker, if you search with "PerfRatingFlex9" you will find the same thing against "id =" tag after the prompt of the FDF field.

    thanx

    Pratap

  • Do I need to use javascript to get a text field in a PDF Tue Fill form with / date of the current day?

    I have a form for booking appointments, and here the date field to fill automatically with

    today's date and print it. I put in the format of the text field 'Date' and when I place the cursor in the

    today's date date field, poster. It disappears as soon as I tab to the next field.

    This action does need a javascript script to fill and print today's date? If Yes, where can I find that?

    Or y at - it another way to fit the text field (not counting as the current date by typing) to get the current date?

    Thank you.

    Ali

    using iMac 2.93 GHz Intel Core 2 Duo 8 GB | OS Snow Leopard 10.6.8 | Acrobat 8 Pro

    See example Acrobat JavaScript by Chris Dahl. The script can be an action script open document level or page to insert the date when the PDF file is open or use as a print action to fill the date just before printing the form. And the formatting of the field is 'None' because JavaScript applies the formatting.

  • View the value of a text in the text field B field

    I have a PDF form with 2 layers. Layer 1 has information, a textfield and a button. Layer 2 is a model of certificate. The user enters his name in to a textfield called NameEntry.


    When they hit the button, disappears from the layer 1 - instructions and the box of NameEntry become hidden. Layer 2 is the model certificate and I need a new textfield (which is called NameDisplay) to be filled based on the information entered in the text field NameEntry.


    The answer is simple, I know, is to appoint the two text fields. This does not work for me I need input textfield that will carry the differently (background and border) because of decisions out of my hands vs the NameDisplay who will be no background and no border.

    Any ideas? Thank you!

    Use this custom calculation script:

    Event.Value = this.getField("NameEntry").valueAsString;

  • How can I get cursor to open above the text field?

    When to create a form with fields of text of the slider opens in the middle of a text field. (according to the image) How can I get cursor to open above the text field?

    Thanks for any help

    cursor.jpg

    Set the field to be multiline.

  • Web page open based on the value of the text field

    I want to open a web page that is based on the value of a text field.  How to bind the value of a text field to a command which will open the web page?

    For example, the value of the text field is: 8 t - EXT

    and the web page I want to open when you press a button is: http://hqms/doc.asp?dn=8T-EXT

    As you can see that the 8 t - EXT is something that a person enters the form and is what is needed to open the web page.  The other text in the link of the webpage is always the same.

    Thank you

    Hello

    In the click event of the button, place the following JavaScript code:

    if (TextField1.rawValue !== null) {
         var vURL = "http://hqms/doc.asp?dn=" + TextField1.rawValue;
         app.launchURL(vURL, true);
    }
    else {
         app.alert("Dear user, please put a code in the text field. Thank you!");
    }
    

    You need to change the object references based on your shape.

    Niall

  • How can I get the text value of an element XML in MXML?

    Hello


    I have the following XML loaded into a variable of XML type:

    Properties of <>
    the RIMpro data collector Configuration < comment > < / comment >
    < key="server.pear.username"/ entry >
    < key = "enter server.apple.retry.times" > 5 < / entry >
    < Enter key = "rdc.proxy.host" > http://192.168.1.2:8080 < / Entry >

    /Properties >

    I can easily get the key attribute displayed in a DataGridColumn by setting the dataProvider my variable and the data in "@key" area  But I don't know how to get the text value in a second column...  Is it possible or do I have to change my XML to something like this:

    Properties of <>
    the RIMpro data collector Configuration < comment > < / comment >
    < key="server.pear.username"/ entry >
    < key = "enter server.apple.retry.times" value = "5" > < / entry > "
    < Enter key = "rdc.proxy.host" value ="
    http://192.168.1.2:8080"""> < / entry > "

    /Properties >

    Thanks in advance.


    Marc

    Yes, you'd better change your XML structure to fit the internal mechanisms of the DataGrid.

    As model dataField require each element of the grid line to have a named property to display, otherwise you will be forced to overcome this model to the custom help labelFunction for the particular column that will implement your custom actions on how to extract the appropriate data for this column of the grid line item. It will be much more complicated that just reorganize your xml structure.

Maybe you are looking for

  • Satellite L350D-215 does support the internal webcam?

    Can someone tell me if the Satellite L350D-215 has a Webcam?The specification on page says Toshiba. Yes, but the page on the site of the Comet - where he sends you to buy it from, say there is not one! Anybody know one way or the other? Thank you!And

  • Store full of internal data in the file "Blah blah" format.

    Very unexpected error. Don't know what to do with it. See the attached file. I have v12 Diadem Advanced

  • Windows 7 and big fish games

    When trying to play big fish games I get only a very small screen.  It will not open in full screen.  I tried to run mode compatible xp and turn off windows 7 areo.  But then games does not open.Help, please.Thank you.

  • I have a canon pixma 210 and lost the installation disc an idears

    I can't find the disc of installation for my canon pixma 210 y at - there some way around this or any idears, please?

  • Downloading reports

    I was watching my download reports for my application and I was wondering if this number is "new downloads" or "new downloads and updates. Apple breaks it down into 2 different categories and it would be good to know which downloads are new customers