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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding?

Status
Not open for further replies.

WhiteTiger

Programmer
Jun 26, 2001
605
US
I'm trying to do document.all("m1").value + document.all("m2").value...but it doesn't add...the other operands work...any help? Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
Whats happening when you try to add them Mise Le Meas,

Mighty :)
 
hie
Luke, is it still about total txt field & stuff?
if it is, & ur result is concatenated then i'll suggest u 2 use parseInt() function:
var tmp1=parseInt(document.forms.formname.txtname1.value)
var tmp2=parseInt(document.forms.formname.txtname2.value)
document.forms.formname.total.value=tmp1+tmp2
:) regards, vic
 
Yea, it was the textboxes...thanks for the parseint thingy!...=)

When I tried adding them, they combined...like 5 + 5 would turn out being 55

etc...thanks again Vic! Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top