function createCost() {
//alert() is to give an alert message, save the values as variables instead.

var h = document.getElementById("h1").value;
var w = document.getElementById("w1").value;

//do your calculations like u do in PHP
// answer = ((height x width)+ cost of frame)x 35% gallery comission)
  
var c = (((h*w)+100)*1.65);
c = Math.round(c/10)*10;

 
       //set the value in the input field

document.getElementById("c").value = c;
}