topical media & game development

talk show tell print

professional-javascript-11-SubmitOnceExample.htm / htm

          <title>Submit Once Example</title>
          <script type="text/javascript" src="formutil.js"></script>
      <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="button" value="Submit Form" onclick="this.disabled = true; this.form.submit()" />

(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.