<html>
   <head><title>Testing</title></head>
   <body bgcolor=white>
   <script>
     function Listener(initial) {
       this.i=initial;
       this.process = function process() {
                        var user = document.forms[0].amount.value - 0;
                        this.i += user;
                        document.getElementById("rctmpx").innerHTML = "Your current balance is: " + this.i;
                      }
     }
   </script>

   <span id="rctmpx">Welcome. Balance is: 0</span> <p>

   <form>
     Enter value here: <input type="text" name="amount">
   </form> <p>

   <input type="button" value="Push me!" onClick="a.process()"> to advance the balance by the value you entered above.

   <script>
     a = new Listener(0);
   </script>

   </body>
</html>