How can I complete 2 variables that are entered through type text/number of entry

So I created 2 fields of text through ready composition

$("<input type='text' value='' name='input1' id='input1' size='5'>").appendTo("#Stage");
sym.$("#input1").css({"position":"absolute","top":"70px", "left":"52px"});
$("<input type='text' value='' name='input2' id='input2' size='5'>").appendTo("#Stage");
sym.$("#input2").css({"position":"absolute","top":"90px", "left":"52px"});

INPUT1 AND input2.

The user then puts a number in each field.

I have a 3rd field created to hold the answer. I also did a text field with the name "scorefield" to see if it works, or the other will do.

Press a button on the stage, the user clicks top to add the first two numbers and the sum are the 3rd field or text field that has the name of the symbol "scorefield.

However, I can't be able to add 2 values for the fields. I have the Send button:

var number1 = $("#input1").val();
var number2 = $("#input2").val();

var additionresult = number1 + number2;

sym.$('scorefield').html(additionresult);

answer1.value = additionresult;

The problem is that is NOT add Number1 and number2.

If I replace with +, - or / or * it works using these symbols, but if I try to use the sign more and add the two, it does not work and physically instead adds the numbers beside eachtoher.

So if I put a 5 in the field one and 2 in field 2, the result comes out at 52... rather than add the two values, it places them next to each other.

I know that these numerical values ARE like any other mathamatical sign works. I can multiplay, subtract, divide these two numbers. I can even check self if his superiors or inferiors to a value using the > or <.

But when I use it, + sign, it breaks.

Is there another sign I should use to add two values?

Sorry I forgot to change the string to an integer earlier. Here is corrected.

file here: https://app.box.com/s/mulkhd1rlyyafovqc3od

input1 var = sym.$("input1")

INPUT1.html ("number 1 :");

userInput1 = $(")') .attr ({'type': 'text', 'value': ", 'id': ' input1"});

userInput1 .css ('font-size', 28);

userInput1 .css ("width", 50);

userInput1 .appendTo (input1);

var input2 = sym.$("input2")

INPUT2.html ("number2 :");

userInput2 = $(")') .attr ({'type': 'text', 'value': ", 'id': 'input2'});

userInput2 .css ('font-size', 28);

userInput2 .css ("width", 50);

userInput2 .appendTo (input2);

{sym.$('btn'). Click (Function ()})

Number 1 var = userInput1.attr ('value');

number2 var = userInput2.attr ('value');

var Numone = parseFloat (number1);

var Numtwo = parseFloat (number2);

var answer = Numone + Numtwo;

SYM.$('result').html (Answer);

});

Tags: Edge Animate

Similar Questions

  • How can I play the songs that are in the format of .wma on my PC using my Desktop 4.0.9.17 Windows XP iTunes app?

    How can I play the songs that are in the format of .wma on my PC using my Desktop 4.0.9.17 Windows XP iTunes app?

    Thank you
    RS

    Hello Ristrawn,

    Thank you for your message.  There is no way to play .wma in the iTunes player.  You will need to find a 3rd party software to convert .wma to .mp3 files.  From there, you would be able to listen to the MP3 in the iTunes player.
    Please let us know if it did or did not help to solve your problem.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • How can I check for dates that are the same for today.

    If I have a bunch of dates in a datetime colum. How can I check for dates that are the same for today.
    "For example, this value of days would be ' #dateFormat (now (),"mm dd yyyy") #

    The best I could come up with was:

    Select * from data where data.userID =
    2635 AND
    "Convert (varchar, dateAdded, 101) = ' #dateFormat (now (),"mm dd yyyy") #


    How can I get this to work smart peeople :)

    It is best to make the comparison on the datetime values. One technique is to get the current date at midnight. Then add one day to get tomorrow's date. In your sql query finds all values is greater than or equal to today and less than tomorrow.

    One solution is to do everything in MS SQL

    WHERE the dateAdded > = convert (datetime, convert (varchar, getdate(), 112), 112)
    AND dateAdded = dateAdd (d, 1, convert (datetime, convert (varchar, getdate(), 112), 112))

    Another option could be to use CF to calculate dates:


    WHERE the dateAdded > =.
    AND dateAdded<>

  • How can I see the photos that are not in an album?

    How can I see the photos that aren't in an album in the App "Photos"? I noticed that in the Album 'Pictures' are pictures I thought I deleted already. I would like to see all the photos in an album, so I can finally delete them.

    You can go the the file menu Photos and click New Smart Album, and then set the condition of Album - is not. This will create a smart album that will show you all the photos that are not in any other album.

  • How can I print out pictures that are embedded in an Email?

    I have no problem printing photos that are attachments to emails, but I can't find a way to print a photo that has been integrated into an email.

    Who would know how a computer works and is not a problem of Thunderbird.
    When you save the file, save it somewhere where you can find it. Then in Picasa, you go to that location and open the file.
    Windows provides a folder my pictures or office is easy to find.

  • How can I remove the bookmarks that are no longer used.

    I have a list of bookmarks on firefox. Many are more used.
    How can I remove the individual bookmarls of my list.
    Tried to highlight and delete them, but that does not work...

    You can right click and delete, select and use the key "Delete", or remove
    multiple bookmark click to the left of the favorite icon, and then add more with "Ctrl + click"
    or spread with "Shift + click" then delete.

    You can remove bookmarks as described for the deletion of history in

    http://KB.mozillazine.org/Viewing_the_browsing_history_-_Firefox#Selecting_history_items

    The reference to bookmarks won't in the details, because it is in the article above.

    http://KB.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox

    You will be perhaps easier to delete bookmarks you don't want in the list of the bookmarks library. As noted in the article to bookmark sorting you can view and sort by additional columns, I recommend installing the extension "Show Parent Folder" link is in the article to bookmark, unfortunately that you can add the column is not sortable, but it provides valuable information.

  • How can I delete backup files that are infected

    I got my computer which runs Vista, off bugged by the Geek squad. In their note they suggested deleting the old back of the files that are infected. How can I do this?

    You will find the location of the back up and once you find them you can delete them.

    You could run full system scan with:

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    It will scan your entire PC and detect infections.

  • substr? How can I retrieve the codes that are only 6 characters

    I have this request
     
    SELECT 
    distinct
    SUBSTR(A.STVSBGI_CODE,1,6),
    SUBSTR(B.STVSBGI_CODE,1,6),
    A.STVSBGI_TYPE_IND,
    B.STVSBGI_CODE, 
    B.STVSBGI_TYPE_IND
    FROM 
    stvsbgi A ,
    stvsbgi_TEST6C B
    WHERE A.STVSBGI_TYPE_IND = 'C'
    AND B.STVSBGI_TYPE_IND = 'C'
    AND instr(A.STVSBGI_CODE,1,6) =  instr(B.STVSBGI_CODE,1,6)
     
    I want to be able to extract ONLY the values (STVSBGI_CODE) where the SUBSTR (A.STVSBGI_CODE, 1, 6).
    There are codes in the tables of 4 characters, the query gives me 4-6 characters...
    How can I write the query to get the 6-character codes
    Thank yoou

    Hello

    If you want to only include lines in the output, if the code is at least 6 characters?
    Add to the WHERE clause:

    AND     LENGTH (a.stvsbgi_code)     >= 6
    

    It doesn't matter if you use a. stvsbgi_code and b. stvsbgi_code in this State; the join condition is already excluding the lines where it is less than 6 characters but the other is not.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

    Published by: Frank Kulash, November 18, 2011 12:58

  • How can I preview of objects that are outside of the artboard.

    Hello

    When I placed an illustrator file in Indesign, I would choose cmd + D > select "Show Import Options" and we have a preview of the image. On some occasions, the preview will include all foreign objects that are outside the artboard and other times, it only displays the image within the artboard or the bounding box. (See attached examples)

    Anyone know the reason behind this?

    Thank you

    Sutagami

    The only way I can reproduce what you feel is if I save to an .eps and am not aware of the artboard check box on the save dialogue. If you deselect this checkbox you will get all the content in the file, if you select this check box, you will only get the bounding box designated on the artboard. But you never said what you are recording format or what version of Illustrator that you use. I have to assume you are in CS4.

  • How can I fix the libraries that are not connect?

    I have improved my CC ti plans to include stock BUT libraries that I create in Apps doesn't NOT appear in interface stock or visa versa which kind of denies one of the key features. Does anyone know how to fix this?

    Hi Lee,.

    First of all, make sure that you are connected with the same Adobe ID on CC apps and Web Adobe Stock site.

    In addition, make sure you have CC desktop application running which is responsible for the synchronization of libraries CC.

    Let me know how it goes.

    ~ David

  • How can I add a variable that will always be a record of decision?

    I would add the date of the assessment and evaluation of a decision report notes, such as these two variables are always displayed (still relevant), the General conclusion to be true or false. What would be the best way to do this?
    Thank you

    Try to use the "known" operator, for example to include a premise like this in your rule of high level:

    the assessment date is known
    

    If "the date of the assessment" has been declared as a variable, then the 'unknown' part is considered to be a statement that you are using the operator "known". When the doc is compiled, the premise will look something like this:

    [known p4] the assessment date is known
    

    If you get something like that, then it means "assessment date" has not been declared as a variable, and the tool think that you create a new Boolean attribute 'the date of the valuation is known:

    [b1] the assessment date is known
    

    A premise by using the known operator is satisfied when the attribute has a value (any value, no matter what the particular value).

  • How can I change the columns that are displayed and their order of left/right in the view of local files?

    He said title. Currently, files display column headings are ' Local Files/size/Type/update the/CheckedOutBy ' how I don't mind view the Type, or maybe the positions of swap of Type and size?

    Site > Manage Sites > Edit > avancΘs > file view columns

  • How can I find the images that are not in the catalogue?

    I imported about 600 photos of a friend of Wakeboarding in Lightroom. I then analyzed quickly through them and remove those who were not good.

    I wanted to delete these photos in the album. However, in about 10 cases I accidentally their removed from the catalog, not from disk.

    All photos of the wakeboard are in the same folder; There are no other images in this folder.

    Is there a way to find out what images are in this folder, but are not in the Lightroom Catalog?

    Rotaluclac

    Probably the easiest way would be to reimport them in their folder (make sure that the box Import suspected duplicates is enabled).

    Those who imported will be reflected in import previous "collection." In the grid view, select all and press the delete key. Click the appropriate button on the box that appears.

    HAL

  • How can I uniinstall the software that are corrupt

    I want to uninstall the software that is not properly installed and during uninstall, it says that the uninstall file is corrupt

    Hello

    One solution is to start in Safe Mode - repeatedly tap F8 as you start - then
    uninstall programs.

    A better option is to use Revo Unistaller - free version - as it will remove usually more
    programs than their own uninstall programs.

    Revo - Uninstaller - free version
    http://www.revouninstaller.com/revo_uninstaller_free_download.html

    I hope this helps.

  • How can I get 701 viruses that are susposably in my computer without having to pay to do so?

    something which is called "my own pc?  says I have 701 errors of viruses etc... my son clicked on it, but of course, they want money to solve problems!

    Looks like one of these many scam programs. They move quickly and then will not let you do anything until you pay for the program.

    Get rid of my own PC and scan with a software spies/virus removal program known.

    You may need to get extra help on the removal of my own PC.

Maybe you are looking for