I am having problems with some JavaScript in a form I am putting together. I require the script to set the value of the text field 'mla6' in the form 'cq' to the combined total of the values in 'mla2' and 'mla4'.
Created May 7, 2012
Firat Tiryaki Well, "+" is used for combining string values too. You should get the integer value of the fields;
there is a function written as "parseInt(value)" in javascript but it doesn't work in old mac browsers, so it's better to use javascript flexibility in data types.
Simply multiply a value with "1" to get it's integer value, It will be as follows in your code
document.cq.mla6.value=(document.cq.mla2.value*1)+(document.cq.mla4.value*1);
try it and see the result.