We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,680 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Here we use the eval() function as the backbone of a simple calculator. One table is used for the display. A second table holds the buttons for the keypad. The whole thing forms an attractive looking calculator. To test it, simply paste the code into an editor like notepad and…

Excellent. I'm trying to learn html this has helped me a lot. Many thanks

sid the kid
Newbie Poster
1 post since Oct 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Here is how I would approach your calculator problem:

1) find a reference solution in HTML (google will help you find example calculator code)
e.g., http://www.daniweb.com/code/snippet216407.html

2) use MobiOne Design Center to paint a calculator UI.
2a) Use custom button components for the numbers and functions. Create an initial button for the numbers and the copy/paste it 8 more times and change it's text for the appropriate number, 0-9
2b) Include an input field component for presenting the current value

3) run the design in the Test Center iPhone emulator to confirm the UI appears the way you want it to

4) you'll have to write javascript for the button actions
See #1 above for example code and inspiration :)
You can use the Test Center to view and edit the HTML, JS, or CSS files that make up your calculator webapp.

Note, MobiOne does not yet protect customizations of the generated code from a design. Therefore be extra careful not to overwrite your custom js in #3. Currently I put my custom css and js in completely separate files.

Good luck.

sheilaaellis44
Newbie Poster
7 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Very Helpful Thank u.....

jkpjtm
Newbie Poster
1 post since Feb 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

HTML needs a script to do any math or display any numbers from a data source. Used alone, HTML can't do anything but control how a web page is displayed.

MidiMagic
Nearly a Senior Poster
3,363 posts since Jan 2007
Reputation Points: 730
Solved Threads: 184
Skill Endorsements: 1

not run plz help

komalsamad
Newbie Poster
1 post since Apr 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

I also make calculator in java script. When i developed my calculator in javascript I had to write many function. Your code is very simple and no need to use javascript. I also checked it on browser, worked well.

mikerock
Newbie Poster
11 posts since Jan 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0944 seconds using 2.77MB