Results 1 to 3 of 3
Mar 31, 2007, 08:50 #1
- Join Date
- Oct 2006
- 0 Post(s)
- 0 Thread(s)
simple addition using integers stored in variables...not working
this must be really simple but i cant get it to work and it seems so simple that i cant find any website on why this doesnt work for me.
so i have this simple function...
function update(value, oldvalue)
var a = value;
var b = oldvalue;
var result = a + b;
and call the function using a field with this...
But all its doing is concatenating the 2 numbers together as though they are strings!!!
so if this.value = 11
and other = 15
it displays 1115
i want to add them and display the total, do i need to specify them as being integers or something?
Any help would be greatly appreciated!