Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Feet and Inches to Centimeters

Status
Not open for further replies.

BrendaD

Programmer
Jan 26, 2001
25
CA
I have the vague notion that I need to add change the feet to inches, add them to the inches and multiply by 2.54 -

(((txtFeet*12) + txtinches) * 2.54)

Is this the correct way to get the value or would I need to write a function and call it?

How do I go about entering this calculation into a text box called txtCenti?

Thanks in advance,

Brenda

 
you would assign your calculation result to a variable and then incert that ariable's avlue into a text box:
var total = (((txtFeet*12) + txtinches) * 2.54)
document.forms[0].txtCent.value = total --------------------------------------------------
Goals are dreams with deadlines
-------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top