topical media & game development

talk show tell print

professional-javascript-11-FocusOnFirstExample.htm / htm



  <html>
      <head>
          <title>Focus On First Example</title>
          <script type="text/javascript" src="formutil.js"></script>
      </head>
      <body onload="FormUtil.focusOnFirst()">
          <form method="post" action="javascript:alert('Submitted!')">
              <!-- hidden field -->
              <input type="hidden" name="hidden1" value="hidden value" />
              
              <!-- textbox that should get focus -->
              <input type="text" name="textbox1" value="" />
              
              <!-- submit button -->
              <input type="submit" value="Submit Form" />
         </form>
      </body> 
  </html> 
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.