So I made this very basic form with just 4 inputs fields and a submit button with the value and onclick function "calculate".
Then I started coding some javascript for it that looks like this:
function calculate(){
var insert1 = document.getElementById('insert1').value;
var insert2 = document.getElementById('insert2').value;
var insert3 = document.getElementById('insert3').value;
var isnert4 = document.getElementById('insert4').value;
var results = insert1 * insert2 * insert3 * insert4;
document.write(results);
}
So I tested the code by pressing on the submit button and it only displayed "NaN". I noticed that when I change the parameter of the document.write to one of the inserts I don't get the error and it will display the value of the insert. So i think that the issues is in the var result line but i'm not 100% sure.