 <p>I would suggest using <code>document.getElementById('result').value</code> opposed to <code>result.value</code> within your <code>updateScore</code> function to ensure your accessing the correct element.</p> <p>I had included an example where <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.setInterval" rel="nofollow"><code>setInterval</code></a> will call your <code>updateScore</code> every second to illustrate the result being updated,</p> <pre><code>var score = 20; function updateScore (){ score = score + 10; document.getElementById("result").value = score; } setInterval(updateScore,1000); </code></pre> <p>This can be modified at the following fiddle,</p> <p><a href="http://jsfiddle.net/d3QqN/" rel="nofollow">http://jsfiddle.net/d3QqN/</a></p>