lui.szeleong 0 Newbie Poster

I need to do a calculator and assume I have to click button to insert number to display box. For example click 3 and 2 the inputbox display 32 than i need to click "+" button. The add button is to remove the previous number and store it so that i can retype a new number(like a normal calculator do). After that I need to store 3 objects. Which is first input number, "+" and the second number. The reason of store those object is because i need to create the "=" button to send those number to php.
What i need to do and do i need to modify the code. P.S I m using ajax for the "=" function and send it to php. However, I didn't create it yet.

var memory = "";
    $("#add").click(function() {
                memory += $show.val() + "+";
                $show.val("");
            });
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.