Web pages and calculators

Professor_fish

German blue ram
Fish guru
Messages
409
Ratings
118
Points
43
Anyone around here any good at adding aquarium calculators to web pages? I have some spread sheets i did a long time ago, they are mostly different parameter calculators i use. Most of them you wont find already online, i was thinking they might make good web pages for people to input values, rather than download and use a spread sheet.

My web skills are not upto that, I can program micro controllers in C etc, but web stuff isnt something i have done much of.
 

Professor_fish

German blue ram
Fish guru
Messages
409
Ratings
118
Points
43
Might be easier to 'grab' code from sites, most the formula's are the same. So as long as you alter the style of it then i dont see a problem.

Looking at some of the code (java isnt my thing), the actual calculations are the same on most sites (as you would expect).

From that you could do your own style, then all i need to do is supply you the maths for the various calculations.
 

CarpCharacin

Cyprinus carpio
Administrator
Fish mentor
Messages
3,009
Ratings
669
Points
563
Location
Salt Lake City, UT
I can insert code into a XenForo page so it shows up. I have an aquarium volume calculator that could be modified.
Here is the code for that:
Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
var result = 0;
var roundLength = 2;
  function computeGallons()
{
    result = Math.round((document.frmMain.TankLength.value * document.frmMain.TankWidth.value * document.frmMain.TankHeight.value / 231)*100)/100;
    document.frmMain.USGallons.value = Math.round(result*100)/100;
}
</script>
<form name="frmMain"><span class="b">Aquarium Calculator: Calculate Rectangle Fish Tank Volume in Gallons Based on Tank Size</span><p>
 
        Fish Tank Length in Inches:<br />
        <input type="text" name="TankLength" onkeyup="computeGallons()"><br />
        <br />
        Fish Tank Width in Inches:<br />
        <input type="text" name="TankWidth" onkeyup="computeGallons()"><br />
        <br />
        Fish Tank Height in Inches:<br />
        <input type="text" name="TankHeight" onkeyup="computeGallons()"><br />
        <br />
        Aquarium Size is<br />
        <input type="text" name="USGallons" style="border: none; background: #D8EFFF; padding: 12px; width: 10em; font-size: 18px;" readonly> US Gallons<br />
        <br />
    
</form>
 

Professor_fish

German blue ram
Fish guru
Messages
409
Ratings
118
Points
43
When i get a chance i will grab some page sources then, i will also look at the formula on my spread sheet. You wont want alot of the calculations, they are mainly for mixing ferts ect based upon titration results.
 

Professor_fish

German blue ram
Fish guru
Messages
409
Ratings
118
Points
43
No your not copying!! you can use your own styling and simply copy the calculation code, you cant get sued for that. Look at it this way...............

If you did a calculator for working out the diameter of a circle, how many formula are there for doing it? My point being all calculators online will use the same base code (because the formula has to be the same,like say for the volume of a cube), all you do it not copy the style. So make the boxs a different space from each-other or position and color, it also means you can keep a site style for all calculators.
 

Professor_fish

German blue ram
Fish guru
Messages
409
Ratings
118
Points
43
I am trying to write the scripts now, I started a page on a server, the being if i can get them working then you can copy them. I will then delete the page, what i didnt factor in was excel does some maths that normal scripts cant (not easily).

So i am rewriting some of the formulas, they will be longer but in terms of 'maths' easier to code.
 

Professor_fish

German blue ram
Fish guru
Messages
409
Ratings
118
Points
43
James i havnt had chance to work on them, i spend alot of time answering your questions and working both at work and on my site.....
 
Top