New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

A simple JavaScript calculator


Post Reply New Thread Subscribe

 
Thread Tools
mraya

 
mraya's Avatar
 
Member Since: Feb 27, 2005
Location: Framingham, MA
Posts: 942
mraya is a jewel in the roughmraya is a jewel in the rough
Mac Specs: MacBook C2D 2.4 2GB

mraya is offline
I need a very simple and small HTML document with JavaScript, basically a simple calculator, that asks for two values (x and y), adds them and shows the result, as simple as possible.
If anyone has the time to do this i would really appreciate it. I know there are plenty of sites with more complex examples, but i need an extremely simple one. Thanks!

[is pointless to click here]
QUOTE Thanks
Benjamindaines

 
Benjamindaines's Avatar
 
Member Since: Jan 08, 2005
Location: A religiously oppressed state
Posts: 2,822
Benjamindaines is just really niceBenjamindaines is just really niceBenjamindaines is just really niceBenjamindaines is just really niceBenjamindaines is just really nice
Mac Specs: 17" MacBook Pro

Benjamindaines is offline
Hold on.. typing it up now....

QUOTE Thanks
Benjamindaines

 
Benjamindaines's Avatar
 
Member Since: Jan 08, 2005
Location: A religiously oppressed state
Posts: 2,822
Benjamindaines is just really niceBenjamindaines is just really niceBenjamindaines is just really niceBenjamindaines is just really niceBenjamindaines is just really nice
Mac Specs: 17" MacBook Pro

Benjamindaines is offline
I read your post wrong and did it with PHP code. PHP is much simpler and I suggest just using PHP unless you need javascript specifically for this. Here are my instructions...

Again sorry for my mistake.
Attached Files
File Type: zip PHP.rtf.zip (1.1 KB, 8 views)

QUOTE Thanks
mraya

 
mraya's Avatar
 
Member Since: Feb 27, 2005
Location: Framingham, MA
Posts: 942
mraya is a jewel in the roughmraya is a jewel in the rough
Mac Specs: MacBook C2D 2.4 2GB

mraya is offline
Thanks a lot for the file, it does look simpler than JavaScript, but i need JavaScript. I need to do some calculations, just simple math for cell culture, basic chemistry and some protocols. JavaScript gives me the flexibility i need plus eventually i may be able to turn it into a widget and/or transfer it to a PDA.
I'm not familiar with PHP, although it seems simpler i believe it may not give me the compatibility i need later. Anyway, thanks again for your fast answer.

[is pointless to click here]
QUOTE Thanks
giulio

 
giulio's Avatar
 
Member Since: Mar 19, 2007
Location: NY USA
Posts: 1,813
giulio is just really nicegiulio is just really nicegiulio is just really nicegiulio is just really nice
Mac Specs: iMac 5.1 | iMac 7.1 | iPod Touch | iPod Nano

giulio is offline
Here ya go!
Attached Files
File Type: zip RealTimeCalculator.htm.zip (1,010 Bytes, 37 views)

schweb This has to be one of the best threads ever in MF history...
Cherokee This gets my vote for most innovative thread on Mac-Forums... ever.
QUOTE Thanks
mraya

 
mraya's Avatar
 
Member Since: Feb 27, 2005
Location: Framingham, MA
Posts: 942
mraya is a jewel in the roughmraya is a jewel in the rough
Mac Specs: MacBook C2D 2.4 2GB

mraya is offline
Thanks a lot giulio!!!

[is pointless to click here]
QUOTE Thanks
giulio

 
giulio's Avatar
 
Member Since: Mar 19, 2007
Location: NY USA
Posts: 1,813
giulio is just really nicegiulio is just really nicegiulio is just really nicegiulio is just really nice
Mac Specs: iMac 5.1 | iMac 7.1 | iPod Touch | iPod Nano

giulio is offline
you're welcome
QUOTE Thanks
equinox747

 
Member Since: Feb 17, 2009
Posts: 1
equinox747 is on a distinguished road

equinox747 is offline
hi looking for a simple calculator with an item name box: and amount
to simple add another item named box: and another:
like this ...{two cold pies} 1.23 + {three cold pies}1.26 + {two sandwiches} 1.10 = total the one that is posted in a zip file nearly does it. can anybody help????
Equinox
QUOTE Thanks
Turk182

 
Member Since: Jan 30, 2009
Posts: 48
Turk182 is an unknown at this point

Turk182 is offline
great place for JS scripts click here or here or even here
QUOTE Thanks
Bluelou

 
Member Since: Feb 23, 2009
Posts: 1
Bluelou is on a distinguished road

Bluelou is offline
Hello! I am brand new to the mac forum, and hoping someone out there can write me some html coding for our website. I would need something very similary to the one on Color Copies at Cheap Discount Prices, Digital Color Copying and Printing, Booklets, Binding ... is there anyone that can help me out. There isn't anyone I know of in Wyoming that can do this, and its frustrating the heck out of this old business owner.... Amanda
QUOTE Thanks

Post Reply New Thread Subscribe


« Abbreviating dates with CSS | Easiest way to code this text effect? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Simple Pie Chart Creation? Toahine OS X - Apps and Games 3 06-07-2006 06:00 AM
Creating a simple exit page? Morgan19 Web Design and Hosting 1 04-22-2006 12:30 PM
Simple AppleScript request... 570thusaag Running Windows (or anything else) on your Mac 0 02-02-2006 12:33 PM
Help with JavaScript and PhoneBook widget garymm Web Design and Hosting 0 06-09-2005 03:07 AM
Javascript and Frames problem in Safari HarrySpier Web Design and Hosting 3 11-09-2004 04:47 PM

All times are GMT -4. The time now is 04:22 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?