View Single Post
Old May 16, 2008 | 11:42 AM
  #1  
foreigneRS's Avatar
foreigneRS
Testing the future
 
Joined: Jul 2003
Posts: 17,597
Likes: 24
From: W. Sussex
Default javascript help needed please

i need help with some javascript that is probably so simple that you will laugh at me

i am teaching myself javascript for my website, so that i can include some calculators for working out mpg, mileage to payback remap costs etc.

most of it is all working fine, particularly those functions involving variables that are multiplied, for example x = (y*z)

but i can't get a simple one like x =(y+z) to work

if i check with an alert, the numerical values for y and z are as they should be (for example 10 and 20), but then x comes out as 1020 rather than 30

it's doing my head in, please help

Last edited by foreigneRS; May 16, 2008 at 12:45 PM.
Reply