<html>
  <head>
    <title>Capture Form Control Events</title>
    <script language="JavaScript" type="text/javascript">
    <!-- 
       function modifylayer(changetext) {
          var lefield = document.getElementById("lastevent");
          lefield.innerHTML = changetext + "<br><br>&nbsp;";
       }
    //-->
    </script>
  </head>
  <body>
    <h1>Capture Form control events</h1>
    
    <form action="#" method="GET">
       Move the mouse in and out of this field,
       or change its contents.<br>
       <textarea name="samplefield" rows="10" cols="30"
          onmouseover="modifylayer('mouseover')"
          onmouseout="modifylayer('mouseout')"
          onchange="modifylayer('change')"
          onkeypress="modifylayer('keypress')"
          >Sample text
       </textarea>
       <br><br>

       Last event captured:
       <div id="lastevent"
            style="background-color:#CCCCCC; font-weight:bold">
       <br><br>
       </div>
    </form>  
  </body>
</html>