vfierro
01-12-2004, 03:01 PM
I am stuck on what appears to be simple issue, adding two number together.
That darn concatenate thing keeps messing me up. I have tried searching google on "arithmetic operands java" for any help with no avail. All I want to do is assign "y" the value of "x1+x2".
This shouldn’t be this hard. Please any assistance would be greatly appreciated.
Thanks in advance.
<script language="JavaScript">
function s5_calculate(){
with (document.order_form){
y.value=x1.value.+ x2.value;
}
}
</script>
<form name="order_form" ACTION="/cgi-bin/script.pl" METHOD="POST">
.....
<td width="113"><input type="text" name="y" size="16" tabindex="16"
onclick=s5_calculate() value=""
onblur=s5_calculate() value=""></td>
......
Just trying to fill the value of a text box.. y = x1* x2 works , y = x1 / x2 works, y = x1- x2 works
so... if x1 = 8 and x2 = 4
The values if get for y are y=8*4 y=32, y=8\4 y=2, y=8-4 y=4 , y=8+4 y=84
When I use the "+" sign a concantation occures.
That is my issue... I believe.?
That darn concatenate thing keeps messing me up. I have tried searching google on "arithmetic operands java" for any help with no avail. All I want to do is assign "y" the value of "x1+x2".
This shouldn’t be this hard. Please any assistance would be greatly appreciated.
Thanks in advance.
<script language="JavaScript">
function s5_calculate(){
with (document.order_form){
y.value=x1.value.+ x2.value;
}
}
</script>
<form name="order_form" ACTION="/cgi-bin/script.pl" METHOD="POST">
.....
<td width="113"><input type="text" name="y" size="16" tabindex="16"
onclick=s5_calculate() value=""
onblur=s5_calculate() value=""></td>
......
Just trying to fill the value of a text box.. y = x1* x2 works , y = x1 / x2 works, y = x1- x2 works
so... if x1 = 8 and x2 = 4
The values if get for y are y=8*4 y=32, y=8\4 y=2, y=8-4 y=4 , y=8+4 y=84
When I use the "+" sign a concantation occures.
That is my issue... I believe.?