Web pages and calculators

Professor_fish

German blue ram
Fish guru
Messages
432
Reaction score
137
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
432
Reaction score
137
Points
43
I have the formulas, not the code......I guess i could have a shot at java for it and pass you that.
 

Ozzy47

German blue ram
Fish guru
Messages
470
Reaction score
144
Points
43
Location
Chicago Area
Send me a basic one and I can look into the feasibility of doing it in my spare time.
 

Professor_fish

German blue ram
Fish guru
Messages
432
Reaction score
137
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

Site Owner
Administrator
Fish mentor
Messages
3,135
Reaction score
724
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
432
Reaction score
137
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
432
Reaction score
137
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.
 

CarpCharacin

Site Owner
Administrator
Fish mentor
Messages
3,135
Reaction score
724
Points
563
Location
Salt Lake City, UT
I won't need to do my own styling. I would just insert the calculator into a page node. Sure there is only one forumula, but there are different scripts.
 

Professor_fish

German blue ram
Fish guru
Messages
432
Reaction score
137
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.
 

CarpCharacin

Site Owner
Administrator
Fish mentor
Messages
3,135
Reaction score
724
Points
563
Location
Salt Lake City, UT
Thank you. Once you are done, click the plus icon next to the video icon in the editor and select code and paste the script in there and then click insert.
 

Professor_fish

German blue ram
Fish guru
Messages
432
Reaction score
137
Points
43
Ok i will do, i know wish i hadnt used so many built in excel functions!! l0l
 

CarpCharacin

Site Owner
Administrator
Fish mentor
Messages
3,135
Reaction score
724
Points
563
Location
Salt Lake City, UT
Once you are done with the scripts, just put the scrips into code boxes and then I can add them to a page.
 

Professor_fish

German blue ram
Fish guru
Messages
432
Reaction score
137
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