Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Closed Thread
How do I put a BMI calculator on my HTML based site
Old 11-25-2006, 05:26 AM How do I put a BMI calculator on my HTML based site
Novice Talker

Posts: 9
Trades: 0
Hi,

Thanks for a great forum!

I have a site consisting of only html pages (I dont't know how to use php). Anyone know if I can put an BMI calculator on the site?

Best regards
Daniel
Buggy Daniel is offline
View Public Profile
 
 
Register now for full access!
Old 11-25-2006, 05:31 AM Re: How do I put a BMI calculator on my HTML based site
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
http://www.actabit.com/bmi-free.html Just follow the instructions.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
View Public Profile Visit Mooofasa's homepage!
 
Old 11-25-2006, 05:39 AM Re: How do I put a BMI calculator on my HTML based site
Novice Talker

Posts: 9
Trades: 0
Quote:
Originally Posted by Mooofasa View Post
http://www.actabit.com/bmi-free.html Just follow the instructions.
Thanks for your reply. But the only BMI calculator I find on that site is a program that you have to download. What I want to do is to put the calculator function directly on my site.
Buggy Daniel is offline
View Public Profile
 
Old 11-25-2006, 06:33 AM Re: How do I put a BMI calculator on my HTML based site
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Sorry, my mistake.

If I had the mathematical equation to work it out, then I could try and produce a calculator for you.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
View Public Profile Visit Mooofasa's homepage!
 
Old 11-25-2006, 06:56 AM Re: How do I put a BMI calculator on my HTML based site
Novice Talker

Posts: 9
Trades: 0
Quote:
Originally Posted by Mooofasa View Post
Sorry, my mistake.

If I had the mathematical equation to work it out, then I could try and produce a calculator for you.
That would be realy nice of you! If it's possible I would want it to look something like this:
http://balancemindbodysoul.com/bmicalc.html

This is the equation:


If you help me with this, then I would like to give you credit on my site. Have you got a site I can link to?
Buggy Daniel is offline
View Public Profile
 
Old 11-25-2006, 07:13 AM Re: How do I put a BMI calculator on my HTML based site
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Thanks for the link, I didn't need to make it. All I did was find the Javascript function for it at their site and the form that went with it (I made some alterations to the form).
Code:
<!-- Begin
function mod(div,base) {
return Math.round(div - (Math.floor(div/base)*base));
}
function calcBmi() {
var w = document.bmi.weight.value * 1;
var HeightFeetInt = document.bmi.htf.value * 1;
var HeightInchesInt = document.bmi.hti.value * 1;
HeightFeetConvert = HeightFeetInt * 12;
h = HeightFeetConvert + HeightInchesInt;
displaybmi = (Math.round((w * 703) / (h * h)));
var rvalue = true;
if ( (w <= 35) || (w >= 500)  || (h <= 48) || (h >= 120) ) {
alert ("Invalid data.  Please check and re-enter!");
rvalue = false;
}
if (rvalue) {
if (HeightInchesInt > 11) {
reminderinches = mod(HeightInchesInt,12);
document.bmi.hti.value = reminderinches;
document.bmi.htf.value = HeightFeetInt + 
((HeightInchesInt - reminderinches)/12);
document.bmi.answer.value = displaybmi;
}
if (displaybmi <19) 
document.bmi.comment.value = "Underweight";
if (displaybmi >=19 && displaybmi <=25) 
document.bmi.comment.value = "Desirable";
if (displaybmi >=26 && displaybmi <=29) 
document.bmi.comment.value = "prone to health risks";
if (displaybmi >=30 && displaybmi <=40) 
document.bmi.comment.value = "Obese";
if (displaybmi >40) 
document.bmi.comment.value = "Extremely obese";
document.bmi.answer.value = displaybmi; }
return rvalue;
}
//  End -->
HTML Code:
<form name="bmi">
  <input type="text" name="weight">
  <input type="text" name="htf">
  <input type="text" name="hti">
  <input name="button" type="button" onclick="calcBmi()" value="Calculate BMI">
  <input type="text" name="answer">
  <input type="text" name="comment">
</form>
If you need help implementing it, just ask!
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
View Public Profile Visit Mooofasa's homepage!
 
Old 11-25-2006, 09:14 AM Re: How do I put a BMI calculator on my HTML based site
Novice Talker

Posts: 9
Trades: 0
Thank you!!! It works great!

Have you got a site you want me to link?
Buggy Daniel is offline
View Public Profile
 
Old 11-25-2006, 09:56 AM Re: How do I put a BMI calculator on my HTML based site
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
Currently, I'm building my site so I don't really want any inbound links yet. However, if your offer is still up for about a week, then I will take it I will also provide a link to your site.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
View Public Profile Visit Mooofasa's homepage!
 
Old 11-25-2006, 10:04 AM Re: How do I put a BMI calculator on my HTML based site
Novice Talker

Posts: 9
Trades: 0
That´s a deal

Send me a pm when you are finished with your site.
Buggy Daniel is offline
View Public Profile
 
Closed Thread     « Reply to How do I put a BMI calculator on my HTML based site
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.64931 seconds with 12 queries