Yeah youre right, C = A*B, but I needed an extra 25% added to the total figure. This is something a friend is working on, so theres no stress, if it was a client job i'd be sticking with the design and palming off the code to someone else!
But I ended up with this, which seems to work:
Thanks for your time, we may even end up mixing the two, or i'll see how he is with digesting the code you provided, as its much better/more flexible.
A = document.carpet.widthBox.value
B = document.carpet.lengthBox.value
A = Number(A)
B = Number(B)
C = (A+B)
//document.carpet.totalBox.value = C
alert("The total area is "+area+" and the cost is "+(area*cost));