title: im making a golf scorecard program in php but want to use javascript for counting the hits
body: <p>now i have programmed in php to hit a button after every hit you make but thats in php so after hit the button the program takes contact with the server.
  i would like to know if it is possible to make the hit calculation via javascrit sothat the program does not upgrade to the server an the hits will be visable in the screen and be upgraded everytime via javascript. sothat after ending the hole i can save the result to the server.
  i had made the following for test . but still the computer goes to update via the server.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;?
  if ($aantalslagen_plus==""){
      $aantalslagen_plus="0";
  }
  ?&gt;
    &lt;script type="text/javascript"&gt;
   var a = &lt;? echo $aantalslagen_plus; ?&gt;
        function bereken() {
      a += 1;
      document.getElementById('aantalslagen').value = a;
  };
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;  
  &lt;form method="post" action="" . $_SERVER['PHP_SELF'] . ""&gt;
  &lt;br&gt;&lt;br&gt;&lt;br&gt;
  &lt;table width="422" height="179" border="0"&gt;
  &lt;tr&gt;
  &lt;td&gt;totaal aantal slagen: &lt;/td&gt;
  &lt;td&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php
       $aantalslagen_plus = htmlentities($_POST['aantalslagen_plus']);
  ?&gt;
  &lt;tr&gt;
  &lt;td&gt;totaal aantal slagen php:&lt;/td&gt;
  &lt;td&gt;
  &lt;?   echo "&lt;input type=\"text\" VALUE=\"$aantalslagen_plus\" name=\"aantalslagen_plus\" id=\"aantalslagen\" size=\"10\"&gt;"; ?&gt;
  &lt;td&gt;&lt;? echo $aantalslagen_plus; ?&gt;&lt;/td&gt;
  &lt;/tr&gt; 
  &lt;/table&gt;
  &lt;br&gt;
  &lt;button onclick="bereken();"&gt; + &lt;/button&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>