The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Please Help w/ HTML - Java
4yourbody.info
post Jan 28 2008, 12:01 AM
Post #1





Group: Members
Posts: 6
Joined: 27-January 08
Member No.: 4,815



I can't figure out for the life of me why this calculator works on one page and not the other. Did I leave something out.

This one works:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "hmpro6.dtd">
<HTML>
<HEAD>
<META NAME="KEYS"
CONTENT="body mass index, bmi, weight, obesity, overweight, heart disease, stroke">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Calculate your BMI - Standard BMI Calculator</TITLE> <script LANGUAGE="Javascript" TYPE="text/javascript">
<!--
function cal_bmi(lbs, ins)
{
h2 = ins * ins;
bmi = lbs/h2 * 703
f_bmi = Math.floor(bmi);
diff = bmi - f_bmi;
diff = diff * 10;
diff = Math.round(diff);



if (diff == 10) // Need to bump up the whole thing instead
{
f_bmi += 1;
diff = 0;
}
bmi = f_bmi + "." + diff;
return bmi;
}
function compute(){
var f = self.document.forms[0];

w = f.wt.value;
v = f.htf.value;
u = f.hti.value;

// Format values for the BMI calculation

if (!chkw(u))
{
var ii = 0;
f.hti.value = 0;
} else
{
var it = f.hti.value*1;
var ii = parseInt(it);
}

var fi = parseInt(f.htf.value * 12);
var i = parseInt(f.htf.value * 12) + f.hti.value*1.0; // var i = fi + ii; aeisenberg@air.org: now the height in inches is correctly summed

// Do validation of remaining fields to check for existence of values

if (!chkw(v))
{
alert("Please enter a number for your height.");
f.htf.focus();
return;
}
if (!chkw(w))
{
alert("Please enter a number for your weight.");
f.wt.focus();
return;
}

// Perform the calculation

f.bmi.value = cal_bmi(w, i);
f.bmi.focus();
}

function chkw(w){
if (isNaN(parseInt(w))){
return false;
} else if (w < 0){
return false;
}
else{
return true;
}
}
// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TOPMARGIN="0" TEXT="#000000" LINK="#D31B32"
VLINK="#863CA6" ALINK="#D31B32" MARGINWIDTH="0" MARGINHEIGHT="0"
LEFTMARGIN="0">
<TABLE WIDTH="600" CELLPADDING="0" CELLSPACING="0" BORDER="0"
SUMMARY="This table is used for layout purposes only.">
<TR>
<TD ALIGN="LEFT"> <A HREF="#content"><IMG HEIGHT="1"
ALT="Skip Navigation" SRC="images/spacer.gif" WIDTH="35" ALIGN="left"
BORDER="0"></A></TD>
</TR>
<TR>
<TD ALIGN="LEFT">

<IMG SRC="images/banner.gif" ALT="Calculate Your Body Mass Index" WIDTH="600"
HEIGHT="74" BORDER="0" USEMAP="#Map"></TD>
</TR>
<TR>
<TD ALIGN="LEFT"> </TD>
</TR>
</TABLE><BR>
<TABLE WIDTH="600" SUMMARY="This table is used for layout purposes only.">
<TR>
<TD>
<FORM NAME="bmi_input">
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="600"
SUMMARY="This table is used for layout purposes only.">
<TR>
<TD VALIGN="TOP">
<P><A NAME="content"></A> Body mass index (BMI) is a
measure of body fat based on height and weight that
applies to both <B>adult</B> men and women. </P>
<UL>
<LI>Enter your weight and height.</LI>
<LI>Click on "Compute BMI" and your BMI will appear in
the heart of the figure. </LI>
</UL>
<P><B>BMI Categories: </B></P>
<UL>
<LI>Underweight = <18.5</LI>
<LI>Normal weight = 18.5-24.9 </LI>
<LI>Overweight = 25-29.9 </LI>
<LI>Obesity = BMI of 30 or greater </LI>
</UL>
</TD>
<TD WIDTH="215" VALIGN="top" ALIGN="right">
<P ALIGN="CENTER"></P>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="200"
SUMMARY="This table is used for layout purposes only.">
<TR>
<TD BGCOLOR="#6F48B3" WIDTH="200" COLSPAN="3">
<TABLE WIDTH="209" BORDER="0" CELLPADDING="0"
CELLSPACING="0" SUMMARY="This table is used for layout purposes only.">
<TR>
<TD BGCOLOR="#FFFFFF">
<IMG SRC="images/bmi-e_01.gif" BORDER="0" ALT="Standard Measurements"
WIDTH="105" HEIGHT="28"></TD>
<TD BGCOLOR="#FFFFFF"> </TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD BGCOLOR="#6F48B3" WIDTH="13">
<IMG BORDER="0" SRC="images/spacer.gif" WIDTH="12" HEIGHT="1" ALT=" "></TD>
<TD BGCOLOR="#6F48B3" WIDTH="184">
<TABLE BORDER="0" CELLSPACING="0" WIDTH="185"
BGCOLOR="#FFFFFF" CELLPADDING="2"
SUMMARY="This table is used for layout purposes only.">
<TR>
<TD WIDTH="199" COLSPAN="3" ALIGN="center">
<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
WIDTH="150" SUMMARY="This table is used for layout purposes only.">
<TR>
<TD ROWSPAN="3" ALIGN="right" WIDTH="50">
<IMG SRC="images/bmi_1-4.gif" ALT=" " WIDTH="36" HEIGHT="201"></TD>
<TD VALIGN="top" WIDTH="50">

<IMG SRC="images/bmi_2-4.gif" ALT=" " WIDTH="50" HEIGHT="76"></TD>
<TD ROWSPAN="3" ALIGN="left" WIDTH="92">
<IMG SRC="images/bmi_4-4.gif" ALT=" " WIDTH="57" HEIGHT="201"></TD>
</TR>
<TR>
<TD ALIGN="center" WIDTH="50">
<INPUT NAME="bmi" TYPE="text" SIZE="4" STYLE="text-align: center"></TD>
</TR>
<TR>
<TD VALIGN="bottom" WIDTH="50">
<IMG SRC="images/bmi_3-4.gif" ALT=" " WIDTH="50" HEIGHT="96"></TD>
</TR>
</TABLE> </TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"><LABEL FOR="htf"><B>
Your Height:</B></LABEL></SPAN></TD>
<TD WIDTH="45" ALIGN="left"><INPUT
TYPE="text" NAME="htf" SIZE="3" ID="htf"></TD>
<TD WIDTH="50" ALIGN="left"><INPUT
TYPE="text" NAME="hti" SIZE="3" ID="hti"></TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"> </SPAN></TD>
<TD WIDTH="45" ALIGN="left"><B><SPAN
STYLE="font-size: 10pt;">(feet)</SPAN></B></TD>
<TD WIDTH="53" ALIGN="left"><B><SPAN
STYLE="font-size: 10pt;">(inches)</SPAN></B></TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"><B><LABEL FOR="wt">
Your Weight:</LABEL></B></SPAN></TD>
<TD WIDTH="45" ALIGN="left">
<P> <INPUT TYPE="text" NAME="wt" SIZE="3"
ID="wt"></P></TD>
<TD WIDTH="53" ALIGN="left"> </TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"> </SPAN></TD>
<TD ALIGN="left" COLSPAN="2"> <B><SPAN
STYLE="font-size: 10pt;">(pounds)</SPAN></B></TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="center"><INPUT TYPE="button"
VALUE="Compute BMI" ONCLICK="self.compute();"></TD>
</TR>
</TABLE></TD>
<TD BGCOLOR="#6F48B3" WIDTH="13">

<IMG BORDER="0" SRC="images/spacer.gif" WIDTH="12" HEIGHT="1" ALT=" "></TD>
</TR>
<TR>
<TD BGCOLOR="#6F48B3" COLSPAN="3" WIDTH="100%"
ALIGN="CENTER"> </TD>
</TR>
</TABLE> </TD>
</TR>
</TABLE> </FORM>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10" WIDTH="600">
<TR>
<TD VALIGN="top" COLSPAN="3"><HR SIZE="1"
COLOR="#6F48B3"><A HREF="#content"><IMG HEIGHT="1" ALT="Skip Navigation"
SRC="images/spacer.gif" WIDTH="35" ALIGN="left" BORDER="0"></A></TD>
</TR>
<TR>
<TD VALIGN="top"> </TD>
<TD ALIGN="center" VALIGN="top">
</TD>

<TD VALIGN="top"> </TD>
</TR>
<TR>
<TD VALIGN="top"> </TD>
<TD ALIGN="center" VALIGN="top">
</TD>
<TD VALIGN="top"> </TD>
</TR>
</TABLE> </TD>
</TR>
</TABLE> </BODY>

</HTML>

********************************************************************************
************

When I try to put the code into this page it doesn't:

<html>
<head>
<title>Healthy Weight Loss Article and Books</title>
<META NAME="keywords" CONTENT="weight loss, lose weight, diet, diets, dieting, body fat, raise metabolism, increase metabolism, complex carbohydrates, simple carbohydrates, sugar, article, articles, book, books, health search, article search">
<META NAME="description" CONTENT="Healthy Weight Loss Article and Books - Lose Weight and Keep it Off the Healthy Way">
<META NAME="objecttype" CONTENT="Healthy Weight Loss Article and Books Page">
<meta name="revisit-after" content="30 days">
<meta name="robots" content="index, follow">
<meta name="rating" content="general">
<meta name="distribution" content="global">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="../../styles.css">
<script LANGUAGE="Javascript" TYPE="text/javascript">
<!--
function cal_bmi(lbs, ins)
{
h2 = ins * ins;
bmi = lbs/h2 * 703
f_bmi = Math.floor(bmi);
diff = bmi - f_bmi;
diff = diff * 10;
diff = Math.round(diff);



if (diff == 10) // Need to bump up the whole thing instead
{
f_bmi += 1;
diff = 0;
}
bmi = f_bmi + "." + diff;
return bmi;
}
function compute(){
var f = self.document.forms[0];

w = f.wt.value;
v = f.htf.value;
u = f.hti.value;

// Format values for the BMI calculation

if (!chkw(u))
{
var ii = 0;
f.hti.value = 0;
} else
{
var it = f.hti.value*1;
var ii = parseInt(it);
}

var fi = parseInt(f.htf.value * 12);
var i = parseInt(f.htf.value * 12) + f.hti.value*1.0; // var i = fi + ii; aeisenberg@air.org: now the height in inches is correctly summed

// Do validation of remaining fields to check for existence of values

if (!chkw(v))
{
alert("Please enter a number for your height.");
f.htf.focus();
return;
}
if (!chkw(w))
{
alert("Please enter a number for your weight.");
f.wt.focus();
return;
}

// Perform the calculation

f.bmi.value = cal_bmi(w, i);
f.bmi.focus();
}

function chkw(w){
if (isNaN(parseInt(w))){
return false;
} else if (w < 0){
return false;
}
else{
return true;
}
}
// -->
</SCRIPT>
</head>
<body>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="766" class="text"id="table1" bgcolor="#FFFFFF">
<tr>
<td>
<div align="center">
<table width="766" border="0" cellpadding="0" cellspacing="0" height="84">
<tr>
<td width="766" height="84">
<!--webbot bot="Include" u-include="../../includes/general_health_pages/health_site_logo.htm" tag="BODY" --></td>
</tr>
</table>
</div>
<div class="seperator">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-4855258898460788";
//728x90, created 1/15/08
google_ad_slot = "4692414946";
google_ad_width = 728;
google_ad_height = 90;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
<table border="0" cellpadding="0" cellspacing="0" id="table2">
<tr>
<td valign="top" class="leftColumn" rowspan="2" align="left">
<div>
<div class="highlight">
Healthy Search</div>
<div class="lsbg">
<table border="0" cellpadding="0" cellspacing="0" width="150" id="table1" height="25">
<tr>
<td align="center" valign="top">
<div class="searchbox">
<form method="get" action="http://www.google.com/custom" target="google_window">
<input type="hidden" name="hl" value="en">
<input type="hidden" name="ie" value="windows-1252">
<input type="hidden" name="oe" value="windows-1252">
<input type="hidden" name="forid" value="1">
<input type="hidden" name="client" value="pub-4855258898460788">
<div>
<div align="left">
<b>
<font face="Arial" size="2">
</font>
<font face="Arial" size="1">
Powered By </font>
<font face="Arial" color="#FFFFFF" size="1">
<a rel="nofollow" target="_blank" href="http://www.google.com/">
Google</a></font></b></div>
<div><input type="hidden" name="domains" value="http://www.4yourbody.info">
<input name="q" type="text" value size="13" maxlength="255">
<input name="sa" type="submit" value="Go">
<br>
<input name="sitesearch" type="radio" value="http://www.4yourbody.info" value checked>
<font size="2" face="Arial">4yourbody</font>
<input type="radio" name="sitesearch"><font size="2" face="Arial">
Web</font></div>
</div>
</form>
</div>
</td>
</tr>
</table>
</div>
</div>
<br><div class="highlight">
Recommended Books</div>
<div class="lsbg">
<table border="0" cellpadding="2" cellspacing="0" width="160" class="booktext" id="table1">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="0" width="160" class="booktext" id="table1">
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/097878510X?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=097878510X">
<img longdesc="../../Templates/A book about wight loss and diet."alt="The Weight Loss Cure They Don't Want You to Know About: Reshape Your Body, Get Rid of Abnormal Body Fat, Increase Your Metabolism, Eliminate Hunger and Food Cravings and Clean Toxins from Your Body" src="http://rcm-images.amazon.com/images/I/51M4-8zYG8L._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" href="http://www.amazon.com/gp/product/097878510X?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=097878510X">
The Weight Loss Cure</a><br>
<br>
Kevin Trudeau
</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1579546463?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1579546463">
<img longdesc="../../Templates/A book about the south beach diet." alt="The South Beach Diet: The Delicious, Doctor-Designed, Foolproof Plan for Fast and Healthy Weight Loss" src="http://rcm-images.amazon.com/images/I/5103V6N9C2L._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1579546463?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1579546463">
The South Beach Diet</a><br>
<br>
Arthur Agatston M.D.</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1579549578?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1579549578">
<img longdesc="../../Templates/A cookbook for people on the south beach diet."alt="The South Beach Diet Cookbook [ILLUSTRATED]" src="http://rcm-images.amazon.com/images/I/513aMOc96NL._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1579549578?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1579549578">The South Beach Diet Cookbook</a><br>
<br>Arthur Agatston M.D.</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0975572229?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0975572229">
<img longdesc="../../Templates/A book about losing weight using the master cleanse." alt="Lose Weight, Have More Energy & Be Happier in 10 Days: Take Charge of Your Life with the Master Cleanse" src="http://rcm-images.amazon.com/images/I/51bHzEwbHAL._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0975572229?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0975572229">Lose Weight, Have More Energy & Be Happier in 10 Days</a><br>
<br>Peter Glickman</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0060959576?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0060959576">
<img longdesc="../../Templates/A book about adult acne problems."alt="Eat More, Weigh Less: Dr. Dean Ornish's Life Choice Program for Losing Weight Safely While Eating Abundantly" src="http://rcm-images.amazon.com/images/I/51Z0W8YSXQL._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0060959576?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0060959576">Eat More, Weigh Less</a><br>
<br>Dean Ornish M.D.</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/039914255X?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=039914255X">
<img longdesc="../../Templates/A book about eating properly for your bosy type." alt="Eat Right 4 Your Type: The Individualized Diet Solution to Staying Healthy, Living Longer & Achieving Your Ideal Weight" src="http://rcm-images.amazon.com/images/I/21BjXhNs2YL._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/039914255X?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=039914255X">
Eat Right 4 Your Type</a><br>
<br>
Dr. Peter J. D'Adamo & Catherine Whitney</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0060765313?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0060765313">
<img longdesc="../../Templates/A guide book to the human body." alt="YOU: The Owner's Manual: An Insider's Guide to the Body that Will Make You Healthier and Younger" src="http://rcm-images.amazon.com/images/I/11wT2LGZZzL._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0060765313?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0060765313">
YOU: The Owners' Manual</a><br>
<br>
Michael F. Roizen M.D. & Mehmet Oz M.D.</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0922433410?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0922433410">
<img longdesc="../../Templates/A book of home remedies to help fight cancer, diabetes, heart disease, arthritis, osteoporosis, memory loss, bad digestion and more."alt="Giant Book of Kitchen Counter Cures: 117 Foods That Fight Cancer, Diabetes, Heart Disease, Arthritis, Osteoporosis, Memory Loss, Bad Digestion and Hundreds of Other Health Problems!" src="http://rcm-images.amazon.com/images/I/11N9PHDCRSL._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/0922433410?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=0922433410">
Giant Book of Kitchen Counter Cures</a><br>
Karen Cicero & Colleen Pierre M.S. R.D.</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1583332367?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1583332367">
<img longdesc="../../Templates/A book about how to stop bone loss, prevent fractures, and build healthy bone."alt="Prescription for Nutritional Healing, 4th Edition: A Practical A-to-Z Reference to Drug-Free Remedies Using Vitamins, Minerals, Herbs & Food Supplements ... A-To-Z Reference to Drug-Free Remedies)" src="http://rcm-images.amazon.com/images/I/21ChdIXPl0L._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1583332367?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1583332367">Prescription for Nutritional Healing</a><br>
Phyllis A. Balch C.N.C.</td>
</tr>
<tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1594868549?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1594868549">
<img longdesc="../../Templates/A book about what foods to eat to lose weight."alt="Eat This Not That: Thousands of Simple Food Swaps That Can Save You 10, 20, 30 Pounds-or More!" src="http://rcm-images.amazon.com/images/I/21xQ+Yi9J8L._SL75_.jpg" border="0"></a>
</td>
<td>
<a rel="nofollow" target="_blank" href="http://www.amazon.com/gp/product/1594868549?ie=UTF8&tag=4yourbodyinfo-20&linkCode=xm2&camp=1789&creativeASIN=1594868549">Eat This Not That</a><br>
<br>David Zinczenko (Editor of Men's Health)</td>
</tr>
</table></td>
</tr>
</table>
<br>
<center>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="owner@4yourbody.info">
<input type="hidden" name="item_name" value="4 Your Body">
<input type="hidden" name="item_number" value="DEF">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.4yourbody.info/ppthank_you.htm">
<input type="hidden" name="cn" value="Your Comments or Suggestions?">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<!--webbot bot="Include" u-include="../../includes/general_health_pages/healthy_browsing.htm" tag="BODY" --><script type="text/javascript"><!--
google_ad_client = "pub-4855258898460788";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as_rimg";
google_cpa_choice = "CAEQyf6XhAIaCKOdNwrYgZ75KK2293MwAFgB";
google_ad_channel = "8542110292";
//-->
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br>
<br>
<!--webbot bot="Include" u-include="../../includes/amazon/health_ad_1.htm" tag="BODY" --></center>
</div>
<br><div class="highlight">
Related Health Links</div>
<div class="lsbg">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-4855258898460788";
//120x90, created 1/15/08
google_ad_slot = "6953430168";
google_ad_width = 120;
google_ad_height = 90;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center></div>
</div> <center>
<script type="text/javascript"><!--
google_ad_client = "pub-4855258898460788";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_cpa_choice = "CAEQ87zSzwMaCJdUr6Oto2reKMuiltQB";
google_ad_channel = "9367307772";
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>
</center></td>
<td valign="top"><table border="0" cellpadding="2" cellspacing="0" width="100%" id="table83">
<tr>
<td>
<!--webbot bot="Include" u-include="../../includes/general_health_pages/health_home_contact.htm" tag="BODY" --></td>
<td>
<p align="right">
<script>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("<small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</b></font></small>")
</script>
</p>
</td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="0" width="100%" id="table82">
<tr>
<td>
<h1>Body Mass Index Calculator</h1>
</td>
</tr>
</table>
<table id="table74" cellspacing="1" cellpadding="5" width="100%" border="0">
<tr>
<td width="100%">
<table width="100%" cellpadding="0" cellspacing="1" border="0" class="text" id="table84">
<tr>
<td width="100%">

<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="600" class="text"
SUMMARY="This table is used for layout purposes only." id="table91">
<TR>
<TD VALIGN="TOP">
<A NAME="content"></A> Body mass index (BMI) is a measure
of your body fat based on height and weight that applies to both <B>adult</B> men
and women.
<UL>
<LI>Enter your weight and height. </LI>
<LI>Click on "Give Me My BMI" and your body mass index
will appear in the center of the character. </LI>
</UL>
<P><B>BMI Categories: </B></P>
<UL>
<LI>Underweight = <18.5</LI>
<LI>Normal weight = 18.5-24.9 </LI>
<LI>Overweight = 25-29.9 </LI>
<LI>Obesity = BMI of 30 or more</LI>
</UL>
<P><B>
<A
HREF="http://www.nhlbi.nih.gov/health/public/heart/obesity/lose_wt/index.htm">Aim
for a Healthy Weight</A>:</B></P>
<UL>
<LI><A
HREF="http://www.nhlbi.nih.gov/health/public/heart/obesity/lose_wt/risk.htm"><B>Assessing
Your Risk</B></A></LI>
<LI><A
HREF="http://www.nhlbi.nih.gov/health/public/heart/obesity/lose_wt/risk.htm#limitations"><B>Limitations
of the BMI</B></A></LI>
<LI><B><A
HREF="http://www.nhlbi.nih.gov/health/public/heart/obesity/lose_wt/control.htm">Controlling
Your Weight</A></B></LI>
<LI><B><A
HREF="http://www.nhlbi.nih.gov/health/public/heart/obesity/lose_wt/recipes.htm">Recipes</A></B></LI>

</UL>
<P><SPAN STYLE="font-size: 10pt;">Note: If this does not work
with your browser or for a text alternative to this page, <A
HREF="../general_health/bminojs.htm">go to our CGI based BMI Calculator</A></SPAN> </P></TD>
<TD WIDTH="215" VALIGN="top" ALIGN="right">
<P ALIGN="CENTER"><STRONG><A
HREF="../general_health/sp_bmicalc.htm">Español</A></STRONG></P>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="200"
SUMMARY="This table is used for layout purposes only." id="table92">
<TR>
<TD BGCOLOR="#6F48B3" WIDTH="200" COLSPAN="3">
<TABLE WIDTH="209" BORDER="0" CELLPADDING="0"
CELLSPACING="0" SUMMARY="This table is used for layout purposes only." id="table93">
<TR>
<TD BGCOLOR="#FFFFFF">
<IMG SRC="../../images/body_mass_index_calculator/bmi-e_01.gif" BORDER="0" ALT="Standard Measurements"
WIDTH="105" HEIGHT="28"></TD>
<TD BGCOLOR="#FFFFFF"><A HREF="../general_health/bmi-m.htm">
<IMG SRC="../../images/body_mass_index_calculator/bmi-e_02.gif" BORDER="0" ALT="View Metric Measurements"
WIDTH="104" HEIGHT="28"></A></TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD BGCOLOR="#6F48B3" WIDTH="13">
<IMG BORDER="0" SRC="../../images/spacer.gif" WIDTH="12" HEIGHT="1" ALT=" "></TD>
<TD BGCOLOR="#6F48B3" WIDTH="184">
<TABLE BORDER="0" CELLSPACING="0" WIDTH="185"
BGCOLOR="#FFFFFF" CELLPADDING="2"
SUMMARY="This table is used for layout purposes only." id="table94">
<TR>
<TD WIDTH="199" COLSPAN="3" ALIGN="center">
<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
WIDTH="150" SUMMARY="This table is used for layout purposes only." id="table95">
<TR>
<TD ROWSPAN="3" ALIGN="right" WIDTH="50">
<IMG SRC="../../images/body_mass_index_calculator/bmi_1-4.gif" ALT=" " WIDTH="36" HEIGHT="201"></TD>
<TD VALIGN="top" WIDTH="50">
<IMG SRC="../../images/body_mass_index_calculator/bmi_2-4.gif" ALT=" " WIDTH="50" HEIGHT="76"></TD>
<TD ROWSPAN="3" ALIGN="left" WIDTH="92">
<IMG SRC="../../images/body_mass_index_calculator/bmi_4-4.gif" ALT=" " WIDTH="57" HEIGHT="201"></TD>
</TR>
<TR>
<TD ALIGN="center" WIDTH="50">
<INPUT NAME="bmi" TYPE="text" SIZE="4" STYLE="text-align: center"></TD>
</TR>
<TR>
<TD VALIGN="bottom" WIDTH="50">
<IMG SRC="../../images/body_mass_index_calculator/bmi_3-4.gif" ALT=" " WIDTH="50" HEIGHT="96"></TD>
</TR>
</TABLE> </TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"><LABEL FOR="htf"><B>Your
Height:</B></LABEL></SPAN></TD>
<TD WIDTH="45" ALIGN="left"><INPUT
TYPE="text" NAME="htf" SIZE="3" ID="htf"></TD>
<TD WIDTH="50" ALIGN="left"><INPUT
TYPE="text" NAME="hti" SIZE="3" ID="hti"></TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"> </SPAN></TD>
<TD WIDTH="45" ALIGN="left"><B><SPAN
STYLE="font-size: 10pt;">(feet)</SPAN></B></TD>
<TD WIDTH="53" ALIGN="left"><B><SPAN
STYLE="font-size: 10pt;">(inches)</SPAN></B></TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"><B><LABEL FOR="wt">Your
Weight:</LABEL></B></SPAN></TD>
<TD WIDTH="45" ALIGN="left">
<INPUT TYPE="text" NAME="wt" SIZE="3"
ID="wt"></TD>
<TD WIDTH="53" ALIGN="left"> </TD>
</TR>
<TR>
<TD WIDTH="95"><SPAN
STYLE="font-size: 10pt;"> </SPAN></TD>
<TD ALIGN="left" COLSPAN="2"> <B><SPAN
STYLE="font-size: 10pt;">(pounds)</SPAN></B></TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="center"><INPUT TYPE="button"
VALUE="Give Me My BMI" ONCLICK="self.compute();"></TD>
</TR>
</TABLE></TD>
<TD BGCOLOR="#6F48B3" WIDTH="13">
<IMG BORDER="0" SRC="../../images/spacer.gif" WIDTH="12" HEIGHT="1" ALT=" "></TD>
</TR>
<TR>
<TD BGCOLOR="#6F48B3" COLSPAN="3" WIDTH="100%"
ALIGN="CENTER"> </TD>
</TR>
</TABLE> </TD>
</TR>
</TABLE>
</td>
</tr>
<tr><td>
<TABLE BORDER="1" WIDTH="100%" id="table96" class="text">
<h1>Body Mass Index Tables</h1>
To use this body bass index table, find your height in the left column labeled "Height". Move across that row and pick the closest matching weight. Follow that column to the top of the BMI chart. The number at the top of the column is the body mass index for that height and weight. <BR>
For a printable version of the body mass index tables use our <A HREF="unsaved:///bmi_tbl.pdf"><B>PDF</B> version</A>.<THEAD> <TR VALIGN="bottom">
<TH ALIGN="right" id="un_0">BMI</TH>
<TH ALIGN="right" id="un_1" abbr="BMI 19">19</TH>
<TH ALIGN="right" id="un_2" abbr="BMI 20">20</TH>
<TH ALIGN="right" id="un_3" abbr="BMI 21">21</TH>
<TH ALIGN="right" id="un_4" abbr="BMI 22">22</TH>
<TH ALIGN="right" id="un_5" abbr="BMI 23">23</TH>
<TH ALIGN="right" id="un_6" abbr="BMI 24">24</TH>

<TH ALIGN="right" id="un_7" abbr="BMI 25">25</TH>
<TH ALIGN="right" id="un_8" abbr="BMI 26">26</TH>
<TH ALIGN="right" id="un_9" abbr="BMI 27">27</TH>
<TH ALIGN="right" id="un_10" abbr="BMI 28">28</TH>
<TH ALIGN="right" id="un_11" abbr="BMI 29">29</TH>
<TH ALIGN="right" id="un_12" abbr="BMI 30">30</TH>
<TH ALIGN="right" id="un_13" abbr="BMI 31">31</TH>
<TH ALIGN="right" id="un_14" abbr="BMI 32">32</TH>
<TH ALIGN="right" id="un_15" abbr="BMI 33">33</TH>

<TH ALIGN="right" id="un_16" abbr="BMI 34">34</TH>
<TH ALIGN="right" id="un_17" abbr="BMI 35">35</TH>
</TR>
<TR VALIGN="middle">
<TH ALIGN="center" id="un_18" headers="un_0"><B>Height<BR>
(inches)</B></TH>
<TH COLSPAN="17" ALIGN="CENTER" id=""><B>Body Weight (pounds)</B></TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_20" headers="un_18" abbr="58 inches tall">58</TH>

<TD ALIGN="RIGHT" headers="un_20 un_1 ">91</TD>
<TD ALIGN="right" headers="un_20 un_2 ">96</TD>
<TD ALIGN="right" headers="un_20 un_3 ">100</TD>
<TD ALIGN="right" headers="un_20 un_4 ">105</TD>
<TD ALIGN="right" headers="un_20 un_5 ">110</TD>
<TD ALIGN="right" headers="un_20 un_6 ">115</TD>
<TD ALIGN="right" headers="un_20 un_7 ">119</TD>
<TD ALIGN="right" headers="un_20 un_8 ">124</TD>
<TD ALIGN="right" headers="un_20 un_9 ">129</TD>

<TD ALIGN="right" headers="un_20 un_10 ">134</TD>
<TD ALIGN="right" headers="un_20 un_11 ">138</TD>
<TD ALIGN="right" headers="un_20 un_12 ">143</TD>
<TD ALIGN="right" headers="un_20 un_13 ">148</TD>
<TD ALIGN="right" headers="un_20 un_14 ">153</TD>
<TD ALIGN="right" headers="un_20 un_15 ">158</TD>
<TD ALIGN="right" headers="un_20 un_16 ">162</TD>
<TD ALIGN="right" headers="un_20 un_17 ">167</TD>
</TR>

<TR VALIGN="bottom">
<TH ALIGN="center" id="un_21" headers="un_18" abbr="59 inches tall">59</TH>
<TD ALIGN="right" headers="un_21 un_1 ">94</TD>
<TD ALIGN="right" headers="un_21 un_2 ">99</TD>
<TD ALIGN="right" headers="un_21 un_3 ">104</TD>
<TD ALIGN="right" headers="un_21 un_4 ">109</TD>
<TD ALIGN="right" headers="un_21 un_5 ">114</TD>
<TD ALIGN="right" headers="un_21 un_6 ">119</TD>
<TD ALIGN="right" headers="un_21 un_7 ">124</TD>

<TD ALIGN="right" headers="un_21 un_8 ">128</TD>
<TD ALIGN="right" headers="un_21 un_9 ">133</TD>
<TD ALIGN="right" headers="un_21 un_10 ">138</TD>
<TD ALIGN="right" headers="un_21 un_11 ">143</TD>
<TD ALIGN="right" headers="un_21 un_12 ">148</TD>
<TD ALIGN="right" headers="un_21 un_13 ">153</TD>
<TD ALIGN="right" headers="un_21 un_14 ">158</TD>
<TD ALIGN="right" headers="un_21 un_15 ">163</TD>
<TD ALIGN="right" headers="un_21 un_16 ">168</TD>

<TD ALIGN="right" headers="un_21 un_17 ">173</TD>
</TR>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_22" headers="un_18" abbr="60 inches tall">60</TH>
<TD ALIGN="right" headers="un_22 un_1 ">97</TD>
<TD ALIGN="right" headers="un_22 un_2 ">102</TD>
<TD ALIGN="right" headers="un_22 un_3 ">107</TD>
<TD ALIGN="right" headers="un_22 un_4 ">112</TD>
<TD ALIGN="right" headers="un_22 un_5 ">118</TD>
<TD ALIGN="right" headers="un_22 un_6 ">123</TD>

<TD ALIGN="right" headers="un_22 un_7 ">128</TD>
<TD ALIGN="right" headers="un_22 un_8 ">133</TD>
<TD ALIGN="right" headers="un_22 un_9 ">138</TD>
<TD ALIGN="right" headers="un_22 un_10 ">143</TD>
<TD ALIGN="right" headers="un_22 un_11 ">148</TD>
<TD ALIGN="right" headers="un_22 un_12 ">153</TD>
<TD ALIGN="right" headers="un_22 un_13 ">158</TD>
<TD ALIGN="right" headers="un_22 un_14 ">163</TD>
<TD ALIGN="right" headers="un_22 un_15 ">168</TD>

<TD ALIGN="right" headers="un_22 un_16 ">174</TD>
<TD ALIGN="right" headers="un_22 un_17 ">179</TD>
</TR>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_23" headers="un_18" abbr="61 inches tall">61</TH>
<TD ALIGN="right" headers="un_23 un_1 ">100</TD>
<TD ALIGN="right" headers="un_23 un_2 ">106</TD>
<TD ALIGN="right" headers="un_23 un_3 ">111</TD>
<TD ALIGN="right" headers="un_23 un_4 ">116</TD>
<TD ALIGN="right" headers="un_23 un_5 ">122</TD>

<TD ALIGN="right" headers="un_23 un_6 ">127</TD>
<TD ALIGN="right" headers="un_23 un_7 ">132</TD>
<TD ALIGN="right" headers="un_23 un_8 ">137</TD>
<TD ALIGN="right" headers="un_23 un_9 ">143</TD>
<TD ALIGN="right" headers="un_23 un_10 ">148</TD>
<TD ALIGN="right" headers="un_23 un_11 ">153</TD>
<TD ALIGN="right" headers="un_23 un_12 ">158</TD>
<TD ALIGN="right" headers="un_23 un_13 ">164</TD>
<TD ALIGN="right" headers="un_23 un_14 ">169</TD>

<TD ALIGN="right" headers="un_23 un_15 ">174</TD>
<TD ALIGN="right" headers="un_23 un_16 ">180</TD>
<TD ALIGN="right" headers="un_23 un_17 ">185</TD>
</TR>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_24" headers="un_18" abbr="62 inches tall">62</TH>
<TD ALIGN="right" headers="un_24 un_1 ">104</TD>
<TD ALIGN="right" headers="un_24 un_2 ">109</TD>
<TD ALIGN="right" headers="un_24 un_3 ">115</TD>
<TD ALIGN="right" headers="un_24 un_4 ">120</TD>

<TD ALIGN="right" headers="un_24 un_5 ">126</TD>
<TD ALIGN="right" headers="un_24 un_6 ">131</TD>
<TD ALIGN="right" headers="un_24 un_7 ">136</TD>
<TD ALIGN="right" headers="un_24 un_8 ">142</TD>
<TD ALIGN="right" headers="un_24 un_9 ">147</TD>
<TD ALIGN="right" headers="un_24 un_10 ">153</TD>
<TD ALIGN="right" headers="un_24 un_11 ">158</TD>
<TD ALIGN="right" headers="un_24 un_12 ">164</TD>
<TD ALIGN="right" headers="un_24 un_13 ">169</TD>

<TD ALIGN="right" headers="un_24 un_14 ">175</TD>
<TD ALIGN="right" headers="un_24 un_15 ">180</TD>
<TD ALIGN="right" headers="un_24 un_16 ">186</TD>
<TD ALIGN="right" headers="un_24 un_17 ">191</TD>
</TR>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_25" headers="un_18" abbr="63 inches tall">63</TH>
<TD ALIGN="right" headers="un_25 un_1 ">107</TD>
<TD ALIGN="right" headers="un_25 un_2 ">113</TD>
<TD ALIGN="right" headers="un_25 un_3 ">118</TD>

<TD ALIGN="right" headers="un_25 un_4 ">124</TD>
<TD ALIGN="right" headers="un_25 un_5 ">130</TD>
<TD ALIGN="right" headers="un_25 un_6 ">135</TD>
<TD ALIGN="right" headers="un_25 un_7 ">141</TD>
<TD ALIGN="right" headers="un_25 un_8 ">146</TD>
<TD ALIGN="right" headers="un_25 un_9 ">152</TD>
<TD ALIGN="right" headers="un_25 un_10 ">158</TD>
<TD ALIGN="right" headers="un_25 un_11 ">163</TD>
<TD ALIGN="right" headers="un_25 un_12 ">169</TD>

<TD ALIGN="right" headers="un_25 un_13 ">175</TD>
<TD ALIGN="right" headers="un_25 un_14 ">180</TD>
<TD ALIGN="right" headers="un_25 un_15 ">186</TD>
<TD ALIGN="right" headers="un_25 un_16 ">191</TD>
<TD ALIGN="right" headers="un_25 un_17 ">197</TD>
</TR>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_26" headers="un_18" abbr="64 inches tall">64</TH>
<TD ALIGN="right" headers="un_26 un_1 ">110</TD>
<TD ALIGN="right" headers="un_26 un_2 ">116</TD>

<TD ALIGN="right" headers="un_26 un_3 ">122</TD>
<TD ALIGN="right" headers="un_26 un_4 ">128</TD>
<TD ALIGN="right" headers="un_26 un_5 ">134</TD>
<TD ALIGN="right" headers="un_26 un_6 ">140</TD>
<TD ALIGN="right" headers="un_26 un_7 ">145</TD>
<TD ALIGN="right" headers="un_26 un_8 ">151</TD>
<TD ALIGN="right" headers="un_26 un_9 ">157</TD>
<TD ALIGN="right" headers="un_26 un_10 ">163</TD>
<TD ALIGN="right" headers="un_26 un_11 ">169</TD>

<TD ALIGN="right" headers="un_26 un_12 ">174</TD>
<TD ALIGN="right" headers="un_26 un_13 ">180</TD>
<TD ALIGN="right" headers="un_26 un_14 ">186</TD>
<TD ALIGN="right" headers="un_26 un_15 ">192</TD>
<TD ALIGN="right" headers="un_26 un_16 ">197</TD>
<TD ALIGN="right" headers="un_26 un_17 ">204</TD>
</TR>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_27" headers="un_18" abbr="65 inches tall">65</TH>
<TD ALIGN="right" headers="un_27 un_1 ">114</TD>

<TD ALIGN="right" headers="un_27 un_2 ">120</TD>
<TD ALIGN="right" headers="un_27 un_3 ">126</TD>
<TD ALIGN="right" headers="un_27 un_4 ">132</TD>
<TD ALIGN="right" headers="un_27 un_5 ">138</TD>
<TD ALIGN="right" headers="un_27 un_6 ">144</TD>
<TD ALIGN="right" headers="un_27 un_7 ">150</TD>
<TD ALIGN="right" headers="un_27 un_8 ">156</TD>
<TD ALIGN="right" headers="un_27 un_9 ">162</TD>
<TD ALIGN="right" headers="un_27 un_10 ">168</TD>

<TD ALIGN="right" headers="un_27 un_11 ">174</TD>
<TD ALIGN="right" headers="un_27 un_12 ">180</TD>
<TD ALIGN="right" headers="un_27 un_13 ">186</TD>
<TD ALIGN="right" headers="un_27 un_14 ">192</TD>
<TD ALIGN="right" headers="un_27 un_15 ">198</TD>
<TD ALIGN="right" headers="un_27 un_16 ">204</TD>
<TD ALIGN="right" headers="un_27 un_17 ">210</TD>
</TR>
<TR VALIGN="bottom">
<TH ALIGN="center" id="un_28" headers="un_18" abbr="66 inches tall">66</TH>

<TD ALIGN="right" headers="un_28 un_1 ">118</TD>
<TD ALIGN="right" headers="un_28 un_2 ">124</TD>
<TD ALIGN="right" headers="un_28 un_3 ">130</TD>
<TD ALIGN="right" headers="un_28 un_4 ">136</TD>
<TD ALIGN="right" headers="un_28 un_5 ">142</TD>
<TD ALIGN="right" headers="un_28 un_6 ">148</TD>
<TD ALIGN="right" headers="un_28 un_7 ">155</TD>
<TD ALIGN="right" headers="un_28 un_8 ">161</TD>
<TD ALIGN="right" headers="un_28 un_9 ">167</TD>

<TD ALIGN="right" headers="un_28 un_10 ">173</TD>
<TD ALIGN="right" headers="un_28 un_11 ">179</TD>
<TD ALIGN="right" headers="un_28 un_12 ">186</TD>
<TD ALIGN="right" headers="un_28 un_13 ">192</TD>
<TD ALIGN="right" headers="un_28 un_14 ">198</TD>
<TD ALIGN="right" headers="un_28 un_15 ">204</TD>
<TD ALIGN="right" headers="un_28 un_16 ">210</TD>
<TD ALIGN="right" headers="un_28 un_17 ">216</TD>
</TR>

<TR VALIGN="bottom">
<TH ALIGN="center" id="un_29" headers="un_18" abbr="67 inches tall">67</TH>
<TD ALIGN="right" headers="un_29 un_1 ">121</TD>
<TD ALIGN="right" headers="un_29 un_2 ">127</TD>
<TD ALIGN="right" headers="un_29 un_3 ">134</TD>
<TD ALIGN="right" headers="un_29 un_4 ">140</TD>
<TD ALIGN="right" headers="un_29 un_5 ">146</TD>
<TD ALIGN="right" headers="un_29 un_6 ">153</TD>
<TD ALIGN="right" headers="un_29 un_7 ">159</TD>

<TD ALIGN="right" headers="un_29 un_8 ">166</TD>
<TD ALIGN="right" headers="un_29 un_9 ">172</TD>
<TD ALIGN="right" headers="un_29 un_10 ">178</TD>
<TD ALIGN="right" headers="un_29 un_11 ">185</TD>
<TD ALIGN="right" headers="un_29 un_12 ">191</TD>
<TD ALIGN="right" headers="un_29 un_13 ">198</TD>
<TD ALIGN="right" headers="un_29 un_14 ">204</TD>
<TD ALIGN="right" headers="un_29 un_15 ">211</TD>
<TD ALIGN="right" headers="un_29 un_16 ">217</TD>

<TD ALIGN="right" headers="un_29 un_17 ">223</TD>
</TR>
<TR VALI
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jan 28 2008, 01:01 AM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



The page where it doesn't work has a lot of other scripts. I recommend that you remove the other scripts one at a time until the BMI script works again. That will show you where the conflict is.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
4yourbody.info
post Jan 28 2008, 04:42 AM
Post #3





Group: Members
Posts: 6
Joined: 27-January 08
Member No.: 4,815



QUOTE(Darin McGrew @ Jan 28 2008, 12:01 AM) *

The page where it doesn't work has a lot of other scripts. I recommend that you remove the other scripts one at a time until the BMI script works again. That will show you where the conflict is.


The code that controls the calculator is in the <head> tag.
I don't know if it helps, but I've uploaded the pages to a test file for easier viewing.

This Works

This Doesn't
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
4yourbody.info
post Jan 28 2008, 05:18 PM
Post #4





Group: Members
Posts: 6
Joined: 27-January 08
Member No.: 4,815



Please help me out here. I can't figure out for the life of me why this BMI calculator works on one page, but not the other. Please excuse the way the pages look I didn't upload all the files.

This one works:
http://www.4yourbody.info/test/1

This one doesn't:
http://www.4yourbody.info/test/2

I received this reply to an earlier post:
f.wt has no properties
compute() (line 25)
onclick(click clientX=0, clientY=0)2 (line 1)
[Break on this error] w = f.wt.value;


I have no idea what that means. I don't know anything when it comes to Java. The Java Script that controls the calculator is in the head tag. Can you tell me how to fix this problem? What line number the error is on? What the value should be? I got permission from the National Institute of Health to use this calculator and can't get it to work when I put it in my page. Thought it would be easy - fooled me.
Edit/Delete Message
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jan 28 2008, 05:40 PM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



For the record: the original thread
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
4yourbody.info
post Jan 28 2008, 06:44 PM
Post #6





Group: Members
Posts: 6
Joined: 27-January 08
Member No.: 4,815



QUOTE(Darin McGrew @ Jan 28 2008, 04:40 PM) *

For the record: the original thread


That answer was really helpful. Thank you so much.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 28 2008, 07:39 PM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



QUOTE(Darin McGrew @ Jan 28 2008, 11:40 PM) *

For the record: the original thread


And now they are one. Merged.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 28 2008, 07:41 PM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



So did you try what Darin suggested yesterday?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
4yourbody.info
post Jan 28 2008, 08:34 PM
Post #9





Group: Members
Posts: 6
Joined: 27-January 08
Member No.: 4,815



QUOTE(pandy @ Jan 28 2008, 06:41 PM) *

So did you try what Darin suggested yesterday?


I removed both of the other forms from the page. They were search boxes. It still doesn't work. I removed the code from the page and placed it in a page all by itself and it still didn't work. I'm so lost it isn't funny.
I've been working on this one problem for about a week, and it's driving me batty.
Please have patience; I'm really trying hard here.

This post has been edited by 4yourbody.info: Jan 28 2008, 08:47 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
4yourbody.info
post Jan 28 2008, 09:17 PM
Post #10





Group: Members
Posts: 6
Joined: 27-January 08
Member No.: 4,815



Mark this one resolved.
Here's what fixed it, so maybe it can help someone else.

In the Script itself:
changed
var f = self.document.forms[0];
to
var f = document.getElementById("bmi_input");

In the form:
changed
<FORM NAME="bmi_input">
to
<FORM id="bmi_input">

Thanks for trying to help.

This post has been edited by 4yourbody.info: Jan 28 2008, 09:18 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 28 2008, 10:18 PM
Post #11


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



So I guess the form wasn't the first one on the page? The page is gone so I can't check. forms[0] refers to the first occurence of a form, forms[1] to the second and so on.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 11:34 PM