I have the following function that should produce a result to a divs named "totalPrice" and "premPrice", however the .innerhtml doesn't seem to be placing the numbers in the div for some reason? Can you perhaps look over this piece of code and tell me possible reasons why it's not inputting the html? Since i am newer to the web languages, do you have to call the function? or when i simply define it is the function called?
html:
<label class='next action-button'><input type="button" name="tank" value="Yes" onclick="calculateTotal()" />Yes</label><br/>
<p>standard and premium system specs</p>
<br/>
<div id="totalPrice"></div>
<br/>
<div id="premPrice"></div>
js:
function calculateTotal()
{
var boilerPrice = getBoilerSizePrice() + getBedroomSizePrice() + getBathroomSizePrice() + getTankSizePrice() ;
//display the result
var divobj = document.getElementById('totalPrice');
divobj.style.display='block';
divobj.innerHTML = "Your New Boiler Install Price is £"+boilerPrice;
var divobj = document.getElementById('premPrice');
divobj.style.display='block';
divobj.innerHTML = "Premium price £"+((boilerPrice/100)*120);
}