Incrementing a Number in a Text Field by Holding a Button

Hi All,
Just wondering... is there any way to increment a display number up or down my clicking / holding a button?
im making a project to select a fuel tank capacity and want the default to be 0.0 gallons and have the user increase the number or decrease the number by clicking and up or down arrow button... If they hold the same button that function would ideally increment faster, perhaps by multiples of ten until it reached a max / min number.
Thank you for any help... i have no idea where to begin.
Pat

if tf is your textfield and you use movieclip buttons:
btn1.change = .1;
btn1.onPress=function(){
this.onEnterFrame=editTF;
btn1.onRelease=function(){
delete this.onEnterFrame;
btn2.change = -.1;
btn2.onPress=function(){
this.onEnterFrame=editTF;
btn2.onRelease=functino(){
delete this.onEnterFrame;
function editTF(){
tf.text = this.change+Number(tf.text);

Similar Messages

  • Number of visible text fields

    Hi all,
    Trying to upload document numbers from Excel into SAP via transaction F-03 using SAP GUI Scripting.
    My approach is to enter values one by one and press Enter when the last visible text field is reached. Then enter another batch of values, press Enter and so on..
    The problem is that I do not know how to get that event when the last visible field is reached.
    I know the solution but for tables when you can count a number of visible rows (.visibleRowCount).
    Thanks in advance.

    Hi Dmitry,
    in this case, I would proceed as follows:
    1. before the position command the system error handling switch off with
    on error resume next
    2. behind the position command the test of error number with
    if err.number < 0 or err.number > 0
    For example:
    on error resume next
    err.clear
    'position command from existing script
    if err.number > 0 or err.number < 0  then
    'processing . . .
    end if
    on error goto 0
    Declaration on the solution: In a non-relevant line will it not work. This one can evaluate it.
    Regards,
    ScriptMan
    Edited by: ScriptMan on Apr 19, 2010 7:36 PM

  • Verifying if number in a text field will evaluate to a date format

    I have a field, FieldA, that contains 6 numbers, (although the field is a text field). I need to know if that field's numbers evaluate to a true date in the format of mmddyy. For example, if FieldA contains 060110, then that would evaluate to a true date of 6/1/10. However, if FieldA contains 130110, then this is not a valid date and the test will indicate accordingly. I was thinking of using a case statement, but unsure of how to test if the numbers evaluate to a valid date..
    Sort of:
    CASE WHEN FieldA = 'Valid Date' THEN FieldA TO_DATE(FieldA, 'mm-dd-yyyy')
    Any help is appreciated..
    Thanks..

    user12296489 wrote:
    I have a field, FieldA, that contains 6 numbers, (although the field is a text field). I need to know if that field's numbers evaluate to a true date in the format of mmddyy. For example, if FieldA contains 060110, then that would evaluate to a true date of 6/1/10. However, if FieldA contains 130110, then this is not a valid date and the test will indicate accordingly. I was thinking of using a case statement, but unsure of how to test if the numbers evaluate to a valid date..
    Sort of:
    CASE WHEN FieldA = 'Valid Date' THEN FieldA TO_DATE(FieldA, 'mm-dd-yyyy')If fielda contains '060110' (meaining June 1, 2010), then you want to use 'mmddrr' as the 2nd argument to TO_CHAR, not 'mm-dd-yyyy'.
    Any help is appreciated..The following thread has a couple of different solutions:
    Re: how to select valid dates only

  • When click on button - Number in a text field increase by 1

    Hello!
    I have no coding experience and want to create a game like Cookie Clicker. An idle clicker game.
    So I have my button and a text field which says "0$". How can I make it, that when I click on the button the "0$" turns to "1$" and so on... ?
    I use Actionscript 3 as a file type, I hope this is correct.
    I hope someone will help me.
    Greetings!

    I will mark your answer when it works. Now I get no error report, but when I start the game its like this:
    When I click on the button its like this:
    When I click again on the button, it is only the $ symbol again and it doesn't change after.
    Can I send you my file somehow, so you can check?
    Thanks for all your help so far!

  • Expanding text field to hold data

    This sounds like a pretty simple problem, but... I have created a form using Designer that consists for 4 text boxes that span the width of the page. We are using a middleware product, LogiXML, to populate the form. We have successfully accomplished getting the data to appear in the text fields, but the data is being cut of because of the size of the boxes. I have selected the check box to allow the box to expand and to allow mutiple lines. This doesn't seem to have any effect. Am I missing something here?
    Thanks.

    The only field type that'll let you have multiple lines of text is a text edit. With that object, you can check the
    Allow multiple lines property on the Object palette's Field tab and check the
    Expand Height (in your case since the text fields are side-by-side) property on the Layout palette.
    The combination of these two properties should get you text fields which display their content in total visibility.
    If that still doesn't work, then it's possible you haven't saved your form as a
    Dynamic PDF form (or, if you've saved your form as XDP, that you aren't previewing it as a Dynamic PDF form).
    If you think your problem is the preview type (i.e. you're not previewing as a dynamic PDF), the following entry on my blog should help you out:
    Previewing as Dynamic PDF.
    Stefan
    Adobe Systems
    You can set the default preview type (for unsaved files) in the "Tools | Options" menu on the
    page and you can set the preview type for saved files in the "File | Form Properties" menu's
    Defaults page.

  • Make a read-only text field open by using button and javascript

    Hello
    I have a form with text fields that I will pre-populate with data. The text fields will be read-only by default. I want to make it so that when a user wants to make edits, he will need to click on a button and in turn, the text field's background will turn gray and he can make edits to the text field. I can already make the background turn gray but I cannot make the text field open.
    This is the code that will run after the button is clicked:
    color.ltGray = new Array("G", 0.75);
    this.getField('TestField').fillColor = color.ltGray;
    this.getField('TestField').access = "open";
    The text field's background turns gray but it is still read-only. Any ideas?
    Thanks in advance!

    Here's the online version of the Acrobat JavaSript documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/wwhel p.htm?href=JavaScript_SectionPage.70.1.html&accessible=true
    It's also available as a PDF in the Acrobat SDK.
    Regarding your other question about adding a PDF to another, do you want to add it as an attachment, or add the pages from one PDF to another?

  • Set background color for conditional text fields by click of button.

    Hi,
    I am new to apex, the scenario is when i click on a button i.e. Save, it shoulld compare 2 fields P1 and P2 which are text fields.
    If the value of P1 is greaterthan P2 then the whole P1 text field background color should change to "Red" otherwise in any other condition the P1 field should be "Green" color.
    In which section the color function should be called on the Save button?
    On the page in the HTML Header section i have added the below code but the background color is not getting set.
    <script type="text/javascript">
    function fncChangeColor()
    var num1 = $v('P1');
    var num2 = $v('P2');
    if ( num1 > num2 ) {
    document.getElementById("P1").style.background = "RED";
    else {
    document.getElementById("P1").style.background = "GREEN";
    </script>
    Can any one help me in moving ahead with this scenario with a detailed information.
    Thanks,
    Priyanka.

    Hi,
    Call function on button URL target
    javascript:fncChangeColor()If button should submit page, then I think you do not need color field to green.
    Just change to run submit function.
    <script type="text/javascript">
    function fncChangeColor(){
    var num1 = $v('P1');
    var num2 = $v('P2');
    if ( num1 > num2 ) {
      $x("P1").style.background = "RED";
      return false;
    apex.submit({request:"YOUR_REQUEST"});
    </script>Regards,
    Jari

  • Filtering responses in different text fields from different radio buttons.

    Once again I need some guidance with my form please.
    I have a form (audit report) with numerous radio buttons with 4 options each, NA, CN, PC and C.
    Each represents a different answer to the question associated with the radio button.
    This answer this then passes through to a text field next to the radio buttons.
    In turn at the beginning of my form I have an executive brief giving a run down on findings from the different questions asked. These are a reflection of the text fields associated with the radio buttons.
    These are represented as 2 text fields namely, Non-compliant (NC), partial – compliant (PC).
    What I am getting now is a whole lot of “null” answers that change when one of the radio buttons are selected and reflects that answer associated with the selection, both NC and PC text fields are the same and I then have to edit it and delete the PC from the NC section and the same for the PC section.
    What I would like to happen is that all the “nulls” are hidden and only when the answer representing the NC or PC buttons are selected, that those answer get represented through to the Non-compliant (NC), partial- compliant (PC) text fields in my executive brief. IE some sort of filter for each text filed that only displays the NC or PC answers.
    Any help or guidance will be appreciated.

    I will explain this through an example.
    In my application I have created two Select Lists.
    The first select list is a select list with a submit
    P3_X allows selection of 1,2,3
    The page branch sets the value of P3_X with &P3_X. so that way the second select list knows what value it will be using.
    The second select list P3_Y is a dynamic query that says
    Select SCOL d, SCOL r from TEST1 where FCOL=:P3_X
    If you were to have a third select list you would make the second Select List also a submit and have the page branch also set P3_Y with &P3_Y.
    The third Select list would say select from where item=:P3_Y
    Does this answer your question?

  • Using variables to add and subtract a number in a text field?

    The adding bit works fine:
    // get this pconn count
    var this_p_conn:Number = Object(this).parent.p_conn;
    // get current pconn total
    var c_this_p_conn:Number = Object(root).part_count.p_conn_count.text    
    // add this pconn count to total pconn
    var v_this_p_conn:Number = Number(this_p_conn+c_this_p_conn);
    // Update total pconn with new value
    Object(root).part_count.p_conn_count.text = String(v_this_p_conn)
    Removing a value from the total is another story, this looks like it should work but it does not:
    // get this pconn count
    var count_p_conn:Number = Object(this).parent.p_conn;
    // get current pconn total
    var total_p_conn:Number = Object(root).part_count.p_conn_count.text;
    // subtract this pconn count from total pconn
    var new_p_conn:Number = Number(total_p_conn-count_p_conn);
    // Update total pconn with new value
    Object(root).part_count.p_conn_count.text = String(new_p_conn);
    Any ideas or suggestions? My eyes are a bit blurry from looking at code, maybe I missed something obvious. Thanks in advance!

    Never mind, I got it worked out now.
    I had the subtraction code firing AFTER my remove self code, so the player never got to fire the subtract code:
    var b:MovieClip = Object(this).parent;
    Object(this).parent.parent.removeChild(b);
    I placed the subtract code before the above code and now it works fine... I think I need powernap...
    The lesson here is that apparently code fires from the top to the bottom, mind the order of how your code is stacked.
    Sorry for the fuss! Carry on.

  • Extracting and Sorting a Number in a Text field

    Hi everybody,
    I have a column in LOAN_DTL Table as LOAN_DESC which contains data like this:
       CUSTOMER LOAN A/C : CAR  10.00%
       CUSTOMER LOAN A/C : CAR 11
       CUSTOMER LOAN A/C - HOUSE 15.5%
       CUSTOMER LOAN ACCOUNT - CAR 5.50%
       CUSTOMER LOAN A/C - CAR 9%
       CUSTOMER LOAN ACCOUNT : HOUSE 10%
       CUSTOMER LOAN A/C : PERSONAL LOAN 8.50
       CUSTOMER LOAN ACCOUNT : HOUSE 7.75
       CUSTOMER LOAN A/C : HOUSE 6.00
    From the above data, I need to extract the Group i.e. CAR, HOUSE etc. and sort the Group on Rate of Interest order as below :
              CUSTOMER LOAN ACCOUNT - CAR 5.50%
              CUSTOMER LOAN A/C - CAR 9%
              CUSTOMER LOAN A/C : CAR  10.00%
              CUSTOMER LOAN A/C : CAR 11
              CUSTOMER LOAN A/C : HOUSE 6.00
              CUSTOMER LOAN ACCOUNT : HOUSE 7.75
              CUSTOMER LOAN ACCOUNT : HOUSE 10%
              CUSTOMER LOAN A/C - HOUSE 15.5%
              CUSTOMER LOAN A/C : PERSONAL LOAN 8.50
    How to go about the above ?

    Like this?
    SELECT loan_desc,REGEXP_SUBSTR(loan_desc,'[[:digit:],.]+%?') extract_string
    FROM loan_dtl
    ORDER BY 1,
             DECODE(loan_desc,
                    loan_desc,
                    TO_NUMBER(REGEXP_SUBSTR(loan_desc,'[[:digit:],.]+')));
    Message was edited by: 000000

  • How do I code to have the buuton_click fill in my textfields into a table after clicking the button. I created a table in SQL and I need this button click to call the table and fill in the three text fields. both webpage and button code is here.

    using
    System;
    using
    System.Collections.Generic;
    using
    System.Linq;
    using
    System.Web;
    using
    System.Web.UI;
    using
    System.Web.UI.WebControls;
    namespace
    Region_V_project_workshop
    publicpartialclassWebForm5:
    System.Web.UI.Page
    protectedvoidPage_Load(objectsender,
    EventArgse)
    protectedvoidButton1_Click(objectsender,
    EventArgse)
    if you need my webpage code please let me know

    Below is an example of executing a parameterized INSERT statement using SqlClient.
    protected void Button1_Click(objectsender, EventArgse)
    var connection = new SqlConnection(connectionString);
    var command = new SqlCommand("INSERT INTO dbo.YourTable (FirstName, LastName) VALUES (@FirstName, @LastName);", connection);
    command.Parameters.Add("@FirstName", SqlDbType.VarChar, 50).Value = textBoxFirtName.Text;
    command.Parameters.Add("@LastName", SqlDbType.VarChar, 50).Value = textBoxLastName.Text;
    connection.Open();
    command.ExecuteNonQuery();
    connection.Close();
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • How to insert a date picker input text field in a JSF Jsp page

    Hi,
    I have to develop an application using generic facets, unfortunately I am not supposed to use ADF Faces components given by Oracle.
    Now my requirement is, on JSP page an input text field which holds a DATE value is required, it should also have a Date Picker Calendar adjacent to it.
    Could you pls shed some light on this issue and help me out.
    Thanks
    ~Siva(ji)

    <HTML>
    <script language="JavaScript" type="text/javascript">
    <!--
    var pUpWidthc = 300; //Change the pUpWidthc to your requirements.
    var scrAvailc = 400;     //Change to your available screen width. You see in
    //this eBooks' middle frame, the frame width is
                                                                //equal to 410 . So whether your using frames or
                                                                //or a full 800 pixel screen, you must calculate
                                                                //your available screen width.
    var PopUpC = document.getElementById("pUpc");
    document.write('<div id="pUpc" style="visibility:hidden;z-index:4;width:'+pUpWidthc+';position:absolute;"></div>');
    function cstmPup(objC,c){
    popUpC = document.getElementById("pUpc");
    popUpC.innerHTML = c.innerHTML
    popUpC.style.left = getPos(objC,"Left");
    var scrNeedc = getPos(objC,"Left") + pUpWidthc;
    if (scrNeedc > scrAvailc){
    //The number 10 below is an extra offset x value applied when the
    //definitional popup box positions beyond your screen width. You
    //can change this number to fine tune your "beyond screenwidth" positioning.
    var scrOffsetC = getPos(objC,"Left") + pUpWidthc - (scrAvailc);
    popUpC.style.left = getPos(objC,"Left") - (scrOffsetC - 0);
    popUpC.style.top = getPos(objC,"Top") + objC.offsetHeight;
    popUpC.style.visibility = 'visible';
    fill();
    function fill()
         var noOfRows=7,noOfCols=7,i=0,j=0,day=1,x;
    var d1=FirstDayOfWeek(7,2008);
    //40     
         for(i=1;i<noOfRows;i++)
              x=document.getElementById('myTable').insertRow(i);
              for(j=0;j<noOfCols;j++)
                   var y=x.insertCell(j);
                   if( ( i==1 && j<d1))
                   y.innerHTML="";
                   else if(day<=DaysInMonth(7,2008)){
                   y.innerHTML=day;
                   day++;
    //document.write(FirstDayOfWeek(7,2008));
    function FirstDayOfWeek(m,y)
    var i;
    var dow = 6;
    //document.write("Hello");
    for (i=1583; i<y; i++)
    dow += (LeapYear(i)) ? 2 : 1;
    for (i=1; i<m; i++)
    dow += DaysInMonth(i,y);
    return dow % 7;
    function DaysInMonth(m,y)
    // m is the month number (1,2,3,...12), y is the year number (four digits)
    switch (m)
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12: return 31;
    case 2: if (LeapYear(y))
    return 29;
    else
    return 28;
    default: return 30;
    function LeapYear(y)
    return (y % 4==0) && ((y % 100!=0) || (y % 400==0));
    function getPos(objC,sPos){
    var iPos = 0;
    while (objC != null) {
    iPos += objC["offset" + sPos];
    objC = objC.offsetParent;}
    return iPos;
    function hPopUpc(){
    popUpC = document.getElementById("pUpc");
    popUpC.style.visibility = 'hidden';
    //-->
    </script>
    <BODY
    <button id="c1" onclick="cstmPup(c1,pUpCstm)">Custom PopUp</button>
    <'div' id="pUpCstm" style="display:none;">
    <'div' id="myid" align="left" style=" width:100%; height:100%; background:#cccccb; border:1px solid black; border-top:1px solid white; border-left:1px solid white; padding:10px; font:normal 10pt tahoma; padding-left:18px "> <b>Rich Message Boxes</b>
    <hr size="1" style="border:1px solid black;">
         <div style="width:220px; font-family:tahoma; font-size:80%; line-height:1.5em"><br>
              <table border ="1" id="myTable">
                   <TR>
                        <TD> SUN </TD>
                        <TD> MON </TD>
                        <TD> TUE </TD>
                        <TD> WED </TD>
                        <TD> THU </TD>
                        <TD> FRI </TD>
                        <TD> SAT </TD>
                   </TR>
              </table>
         <br><br>
         </div>
         <br>
         <div>
    <button tabindex="-1" onclick="hPopUpc()" style="border:1px solid black; border-left:1px solid white; border-top:1px solid white; background:#cccccc ">Close Message</button>
    </div>
    <?BODY
    </HTML>
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri

  • Why the text field frame's line width cannot be adjusted?

    I am now working on a PDF file with some text fields with combo turned on, specifying the number of chars the fields can hold. Their frames' line width is not thick. This is what I want. This is shown in the picture below:
    But when I try to preview the PDF, I discover that these fields do not follow what I have specified: no matter what thickness I choose, the frames are always thick. I want them to be thin!
    See below:
    Why is it so? What should I do? Any ideas are welcomed.

    I have sent my form to you to take a look. Thanks for your support!
    By the way, I have uninstalled Acrobat 8 and installed Acrobat 9 Pro, but I am facing serious problems. Whenever I open Acrobat I will face an EULA page and if I click "Accept" or "Decline", the whole program will close immediately.
    I have googled and added an EULA value (=1, in hex) in the regedit. No effect. I want to uninstall Acrobat 9, and there is NO RECORD in the Install/Uninstall section in the Control Panel. I am using Vista Home Basic.
    I am now frustrated. I tried Acrobat 9 and it failed, and now I can't even uninstall it and revert to ver 8.......My God....

  • Populating Multirecord text fields from Tlists value's combinations

    I have a UI wherein there are two T lists, one on the Left and other on the Right. The left one contains
    From values and the Right one contains To values. There's one Button which when Pressed should populate
    a Data Block which has multi record text fields just below the button with all the possible combinations of
    the T lists elements. The Text fields have the values From, To, Time, Unit. When populated From and Two will
    get the values from the combinations and the user will enter the values in other fields i.e. Time and Unit,
    Then the user can save the Records.
    e.g. If the Left T list contains Red, Blue and the Right T List contains Green, Black. Then on pressing
    the button below the T lists, the text fields From and Two of a data block displayed in the same window
    should get populated with all the possible combinations as:
    From || To || Unit || Time
    Red Green
    Red Black
    Blue Green
    Blue Black
    Now the user can enter the values for Unit as well as Time and when he does save the Records should be inserted
    for the Data Blocks DML Source that's some table.
    What I'm trying is:
    On pressing the Button i'm writing code that will have Two PL/SQL Tables(Index by binary_integer). One will have
    all the values of the left T List and the other with all the values of right T List.
    I do it as in the WHEN BUTTON PRESSED as:
    DECLARE
    TYPE varchar_table IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
    from varchar_table;
    to varchar_table;
    v_count1 NUMBER;
    v_count2 NUMBER;
    v_count3 NUMBER;
    v_count4 NUMBER;
    BEGIN
    v_count1 := Get_List_Element_Count('CONTROL.FROM_TYPE');
         FOR i IN 1..v_count1 LOOP
              from(i) := Get_List_Element_Value('CONTROL.FROM_TYPE', i);
         END LOOP;
    v_count2 := Get_List_Element_Count('CONTROL.TO_TYPE');
         FOR i IN 1..v_count2 LOOP
              to(i) := Get_List_Element_Value('CONTROL.TO_TYPE', i);
         END LOOP;
    END;
    Now how will I populate the text fields with the values in the tables that i got with the piece of code above.
    Any help would be appreciated. Any other method other than the one i'm trying is also welcome. Please note that
    i'm not using any table to store the elements in the T Lists. The lists get values at runtime by
    user's selection.
    Thanks,
    Abhishek.

    Try and stay civil in your postings. The solotion should be to simply issue a GO_BLOCK, followed by a CREATE_RECORD followed by setting the approriate values :block.value = <value from list>

  • Text field datatype

    I am trying to capture a number from a text field and then
    perform a calculation on it. It is for navigation so a person can
    type in what screen they want to go to. However, it always looks at
    the value as a string and I need it to be a number to do the
    calculation. Can I change the datatype of the textfield or a
    variable?

    Yes, this is known as "casting" and can be done because of
    the close relationship between this format: "123" and 123. This
    does not affect the text field as it does not convert the origional
    value, it only looks at the value in the string as if it were a
    number, or in this case an integer. As you know only a positive
    integer should be entered by the user, it would be better to use:
    jumpVar = 10 * uint(jump_txt.text);
    as this would change "-123" to simply 123.

Maybe you are looking for

  • How do I make a symbol from selection?

    I've got the below script, but it's not working. I'm trying to select all the art in the document on different layers, and create a symbol. So far I have the first part down, but can't figure out how to reference what is selected. actDoc.selection co

  • Separating objects in a collection structure from its original class

    This is an example of my code and will better illustrate what i'm trying to do. The problem is in the List class. public interface ItemInterface {   public java.util.HashMap map ;   public void setMap(String in) ; public abstract class AbstractItem i

  • Any possibility of being given credit for the remaining months/years of @Gamer mag subscription?

    Since the magazine is shutting down completely in May, many of us long time subscribers to the Gamer's Club Unlocked are being left in the lurch with YEARS worth of issues we will never see now. Do you think it's possible that Best Buy or the magazin

  • Tab Navigator freezes

    Hi    I have a tab navigator wherein each tab displays a panel which has information. Each panel has a scrollbar so that the user can scroll through the information on each panel. The issue is when I add the tabs dynamically, and move between tabs, t

  • Can you add bullets.

    Okay I am working on a web page for fbla. And i have a scrolling dynamic text box can i add bullets to the text and if so how.