I am writing a form to get data from boxes and do a calculation when the "Calculate" button is clicked. The button does the calculation through the function cal(),
but it cannot display the result in the countfield box.
How the display the result in the box? Also, how the name the function with "-"?
<script type="text/javascript">
function cal()
{
var hour = document.getElementById( "hourfield" ).value;
var fee = document.getElementById( "feefield" ).value;
var count = document.getElementById( "countfield" ).value;
count = hour + fee;
}
</script>