Thread: Calculator
View Single Post
Old Mar 7th, 2006, 5:00 AM   #2
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 852
Rep Power: 4 The Dark is on a distinguished road
You probably need to convert the values to numbers before adding them together, try something like:
function add()
{
var i=0;
i=document.one.first.value + 0 + document.one.second.value;
document.write(i);
}
The 0 in there should make the whole expression into a numeric one (I think).
The Dark is offline   Reply With Quote