# Javascript form calculator coding

• 01-04-2010, 10:28 PM
Ekka
Javascript form calculator coding
1) To build an online inline calculator. If you visit this page you'll see the current one. I just need the script and form code to drop into another fresh html page.

Trees have 5 basic shapes.

Conical (norfolk pine tree)
Cylindrical
Spherical
Domed (half a sphere)
Prolate spheroid (rugby ball shaped)

Often as arborists we are required to make 2 calculations. Remember that this is for 3 dimensional shapes.

1/ Volume
2/ Surface area

What I want is a calculator similar to the one I built that can work this out... all in one line.

Options from left to right would be little drop down boxes.

1/ Volume or Surface Area (this determines the formula plus answer as m2 or m3)

2/ Shape (some have differing number of dimensions required, ie a sphere only needs 1 radius entered but an ellipsoid needs 2 radii)

3/ Two boxes next .... Now depending on shape determines which of the next boxes have to be filled in. There would be 2 boxes next, first box is the R value and the second box (depending on shape) is "R2 or H" but the spherical and domed options if selected would have to have this field blocked as they only require the R value.

H=Height

Conical needs R & H
Cylindrical needs R & H
Spherical only needs R
Domed only needs R but answer is divided by 2 (hald a sphere/ball)
Prolate spheroid needs 2 R's, minor and major axis, often also called polar axis and equator axis

4/ Calculate button

6/ another answer box showing m2 or m3 depending on if surface area or volume was selected.

Format to be same as current page.

2) PM me with your bid

3) Payment method is Paypal

4) Additional Info: I only really need the form (drop boxes etc) and java coding to insert into a HTML page.

If you need a hand with getting the formula's for surface areas and volumes for those shapes let me know.

Thanks :thumbsup:
Eric
• 01-06-2010, 02:20 AM
Ekka
Formulas for VOLUME:

Cone: (1/3) * pi * (R*R) * H
Sphere: (4/3) * pi * (R*R*R)
Cylinder: pi * (R*R) * H
Prolate spheroid: (4/3) * pi* R*R2*R2

Formulas for SURFACE AREA:

Cone: pi * R * H
Sphere: 4 * pi * (R*R)
Cylinder: (2*pi *R) * (R+H)
Prolate spheroid: I Don't know!!!!
• 01-06-2010, 09:49 AM
hire programmer
Quote:

Originally Posted by Ekka
Formulas for VOLUME:

Cone: (1/3) * pi * (R*R) * H
Sphere: (4/3) * pi * (R*R*R)
Cylinder: pi * (R*R) * H
Prolate spheroid: (4/3) * pi* R*R2*R2

Formulas for SURFACE AREA:

Cone: pi * R * H
Sphere: 4 * pi * (R*R)
Cylinder: (2*pi *R) * (R+H)
Prolate spheroid: I Don't know!!!!

You still could not get anyone ?
• 01-06-2010, 02:10 PM
Ekka
Oh Sorry, yeah I have a chap working on it now.

I did a bit of tinkering myself but the Javascript for me is a killer, like a whole new learning curve and I'm bumbling my way around wasting tons of time but the light is bright at the end of the tunnel. ;)

Here's a link to the page it's all happening at, so far.

http://www.treeworld.info/treesurfac...alculator.html
• 01-11-2010, 10:44 AM
Ekka
Resolved
Job's done, great result, most happy.