Adding values of textbox

wxdqz

New Member
Hi,

I want a simple javascript that tests whether the combined total of 2 input boxes = 100 (it is used on a form to sya what % they use something at work/home)

This is what I have (a snippet of the form validation) but it gives me a syntax error (if removed, no error). I'm sure it's simple to fix.

-------------------------------------
else if (Number(THISFORM.business.value) + Number(THISFORM.personal.value)) !== 100)
{
alert("Your business and personal use must have a combined total of 100");
THISFORM.business.focus();
return false;
-------------------------------------

Thanks,
ren
 
Back
Top