Program That Calculates And Displays A Person's Body Mass Index - BMI
Feb 22, 2010
Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or under-weight for his or her height. A person's BMI is calculated with the following forula: BMI = weight x 703 / height^2
Where weight is measured in pounds and height is measured in inches. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person's weight is considered optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered underweight. If the BMI value is greater than 25, the person is considered overweight.
View 2 Replies
ADVERTISEMENT
Apr 9, 2011
I have previously copied and adapted Javascript examples from textbooks but yesterday I wrote my first program from scratch. The script basically displays my age on my blog in the format 'I am 20 years, 6 months and 12 days old.' The script automatically adjusts my age each day. I would love to receive some critique on my program; particularly on programming style, use of comments, and whether the code is generally well written.
Calculates the difference between the two dates, and convert into days
Calculating Years
Rounds years_old and years_old_r to the nearest whole number
Calculating Months
Calculating Days
View 8 Replies
View Related
Aug 15, 2011
i'm in need of a DHTML program for design tourism management program.. Since i don't have idea on it i unable to design it.
View 1 Replies
View Related
Aug 16, 2010
I'm looking to make a payment form that calculates the prices as you go along, similar to this
i just dont know how to go about it, is there software that can be used?
View 3 Replies
View Related
Oct 2, 2011
I am trying to create a order form that auto calculates my totals as I enter the quantities. It comes up with Not a Number(NaN).Below are snippets from my code this is obviously in a <form>:
HTML:
<!-- Row 3, Col 3 purchase boxes -->
<td colspan="1" height="120" align="left">
<input style="margin-left: 60px" type="text" name="bed_359" size="3" maxlength="3" onchange="calculateValue(this.form)" /> R359</td></tr>[code].....
View 7 Replies
View Related
Mar 15, 2010
I have a javascript class and one of the assignements that we had to do was create a water bill that calculates the number of gallons used and the price for the water consumption. It will not work at all...
View 7 Replies
View Related
Dec 1, 2010
I am trying to write a script that will take a date of birth and another date and, if the person was over 75 years old on the createdDate, return "true" (otherwise return "false").
Unfortunately my code doesn't seem to return either 'true' or 'false'!
The code is:
var dateofBirth="30/10/1982";
var createdDate="01/12/2010";
var sd = dateofBirth.split('/');
var dob = new Date(sd[2],sd[1],sd[0]);
[Code]....
View 2 Replies
View Related
Mar 22, 2010
The title of every facebook profile page is the person's name. Is there a way to display the title?
I want something like:
var personName = SOME.UNKNOWN.CODE
var greeting = "Hello " + personName
document.write(greeting)
View 7 Replies
View Related
Sep 19, 2011
Is there a way to get the MAC address of the person accessing my website? I would like to create a part of my website that only my phone can access.
View 14 Replies
View Related
May 19, 2010
I have an array "personen" I first show in an list in "divLijstDerPersonen" and eliminated the Duplicates. When I click on a name in that list I get a column from all the "personen" with that name. function link_Click() Now I want to make another div with all the details, pictures etc from the person I select in that colomn. function iets_click() but for some reason I'm not able to get the document.getElementById("autoid" + i);
[Code]...
View 2 Replies
View Related
Jan 26, 2009
I have the below array called "results". When I loop through all document elements I would like to check "field_name" against the "results" array and see if it exists and what index number it is at??
// Split the comma delimited response into an array
results = result.split("~");
//Loop through array and populate fields[code].....
View 9 Replies
View Related
Feb 10, 2011
I have created a slideshow before but I want to create a slideshow where a person clicks on a link and it goes to a certain picture which might have one or more links embedded into the picture something like this:
[URL]
View 5 Replies
View Related
Feb 21, 2011
I'm trying to make my body content scroll at the same time as an iframe located within the body. This has to do with the age old problem of mouse focus on iframes. When my mouse reaches the iframe and it takes over focus, I would like the body to keep scrolling until the iframe is right at the top of the screen. After that I want to relinquish focus to the iframe. I don't mind if the iframe starts scrolling as soon as the mouse reaches it, so long as the main body keeps scrolling for a while.
View 5 Replies
View Related
Aug 25, 2010
I am trying to get the index of a li with a specific class. I know I'm selecting the right object because I can apply a CSS class to it (eg change border colour) but when I try to get the index it returns -1. But I know the object exists as I can alter it. :-s
jQuery(document).ready(function() {
var active = $("#tertiarynavigation .bordered").get(0);
var num = $("#tertiarynavigation li").index(active);
alert("Index: " + num);
[Code]......
View 1 Replies
View Related
Jan 16, 2010
[url] I found a script that calculates the price of a journey from A to B using this formula:
Quote:
This current formula is not accurate.
Here is what I need:
First 2 Miles = £5
Each mile after that = £3
View 5 Replies
View Related
Jun 9, 2009
1)i need to create a form with few fields like phoneno,website,address etc and one text area.
2) i copy n paste the details in the textarea n when i click d button. it should automatically populate things into the respective fields.
here s my logic wt i taught of:
1)read the first line in the textbox and load it into contact person field.
2)find the @ symbol and put it into the respective field and if there are more than 1 mail id load it into the same feild using commas.
3)if the phone no is 10 digits then load it into the mobile field else load the rest it into phone field.
4)find for words like road,street,block,stage,floor etc,if present then load it into the address field till the last comma is encountered.
5)the last digits in the address should be loaded into the pincode field.
6)the last word present in the address after the last comma and before the hyphen should be loaded into the city field.
7)find for www or http and load it into the website field,if not found leave it blank.
View 2 Replies
View Related
Nov 3, 2011
I have a problem with layers. In my example there's a link inside div#msg with 'z-index:1' and a overlay with 'z-index:2'. Now when "mousedown" fires, will change the div#msg z-index value from 1 to 3 to be on Top, so the link become a clickable link.
The question is, it is possible to make the link on top and open it with just one click?
This example can do that but won't open the link!
HTML Code:
View 5 Replies
View Related
Mar 3, 2009
I have created a html ncaa tournament bracket for my website in which I hold annual competitions. Recently, my competition has grown and I need a better way for users to submit their brackets. What Im looking for is a way to allow the person filling out the bracket to click on their predicted winner for each game, which will then fill out the bracket as they move through the bracket until the have predicted a national c
View 90 Replies
View Related
Sep 27, 2011
CONDITIONS:If a person selects a Friday Class but not a Saturday Class the Total Cost Field will automatically enter $99.If a person selects a Saturday Class but not a Friday Class the Total Cost Field will automatically enter $99 as well.If a person selects both a Friday & Saturday Class the Total Cost field will automatically be $159.I found the following code and so far only have it changing when a Friday class is entered. I have no idea where to go from here
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
[code].....
View 10 Replies
View Related
Dec 29, 2005
I'm trying to code a feature for my website using DHTML where the person viewing the website can rotate between viewing the positive/negative points of the website being reviewed. This example was in the publication called Using HTML 4 by Lee Anne Phillips. Code:
View 5 Replies
View Related
Feb 15, 2012
I have two grids, they both display buttons. One grid displays numbers, true or false and yes or no, and the other grid displays letters, true, false, yes and no.
The second grid is not displayed in the code (used css to not display second grid buttons (.answerBtns)) Now using the getButtons() function, if the user selects button "1" in first grid (the grid which you have to open using (Open Grid) link, then it should display button "A" in second grid, if user selects button "2" in first grid, then it should displays buttons "A" and "B" in second grid, if "3" then display "A", "B" and "C" and so on.
Now except using if statements and stating which buttons should be displayed and not displayed depending on the button chosen in first grid, is there a more efficent way of coding this so that the display of buttons in second grid depends on what is selected in the first grid?
If it is using an array can somebody show a sample of this in their answer. You can just do it for one example and then I should be able to use that to fill it for the other buttons.
View 1 Replies
View Related
Aug 19, 2010
It's possible to style document.body not to start at 0,0 for example: body {width: 1000px; margin-left: auto; margin-right: auto;} This means that X/Y of the body is not 0,0 but how can I find out what the position is using javascript? document.body.offsetLeft; is 0 and offsetParent is null yet if I position something absolutely at 0,0 it goes to 0,0 of the window, not the body!
View 2 Replies
View Related
Nov 14, 2007
i've got a .net page with a table sitting in it that has no specified height.
I want to be able to grab the height of a specific table (ID="printIntro"). Firefox spits out a number, but IE regardless of version spits out a big fat 0.
from what i understood, IE should be able to understand offsetheight, no?
here's a snippet of a VERY simplified version of what .net generates, as you will see IE will return 0: Code:
View 8 Replies
View Related
Oct 27, 2011
I have an assignment to create a program in JS but I have not read JS much more. So, for this assignment, can anyone help me to solve this assignment? Check attachment. [URL]
View 1 Replies
View Related
May 5, 2011
How to run ajavascrpt prgram...i.e .js extension........
Is it to be run in dreamweaver...or any other simple way is there......or it is to be embedded in html code...and then run as .html extension...
View 1 Replies
View Related
Feb 18, 2009
in javascript i pass value to a hidden field and i get that in alert msg but the same value i am not able to get in teh code behind page in asp.net
alert(document.form1.id.value)
in page behind
i use x= request("id")
not hetting teh value i get a eror msg erro obtaining the value
View 1 Replies
View Related