i am developing a web-based system involving JS calculation (ADD operator) but i can't still figure this out.. can anyone help me out here
var a = parseInt(document.forms.jumbyrsofa.value);
var b = parseInt(document.forms.jumbyrvip.value);
var c = parseInt(document.forms.jumbyrplastik.value);
document.forms.jumbyrkerusi.value = parseInt(a+b+c);
Could you provide any additional info such as what the code actually does (the result) and what you want it to do? Any examples such as what data you put into the fields will also be useful.
At a glance I can't say I see any real problems with your code, but again I don't know what values you are actually putting in, and what the result you're getting is either.
"Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"
By using parseInt, it makes me suspect that a, b and c are Strings instead of numbers, however, without seeing the HTML or you telling us what is happening (i.e. console errors), we cant help.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)