]> git.cworth.org Git - empires-html/blobdiff - index.html
Use an actual "submit" input element instead of a "button"
[empires-html] / index.html
index 3fe90057ebfdac20a5ff2a0e2ff04083b2a38621..7b4444527d51ff48a21a2ef7565185bfd5bd5909 100644 (file)
@@ -13,9 +13,9 @@
 
   <p>
     To join the game, type your own name below. Also, choose the name
 
   <p>
     To join the game, type your own name below. Also, choose the name
-    of a charater that you want to play as. This can be anyone (real
+    of a character that you want to play as. This can be anyone (real
     or fictional) that everyone playing the game would be likely to
     or fictional) that everyone playing the game would be likely to
-    know, (for example "Albert Einsten" or "Harry Potter").
+    know, (for example "Albert Einstein" or "Harry Potter").
   </p>
 
   <p>
   </p>
 
   <p>
   <div id="message-area">
   </div>
 
   <div id="message-area">
   </div>
 
-  <form>
+  <!-- The return false prevents the page from being reloaded -->
+  <form onsubmit="register(this); return false">
     <label for="name">Your name</label>
     <input type="text" id="name" required>
 
     <label for="character">Character name</label>
     <input type="text" id="character" required>
 
     <label for="name">Your name</label>
     <input type="text" id="name" required>
 
     <label for="character">Character name</label>
     <input type="text" id="character" required>
 
-    <input type="button" value="Join game" onclick="register(this.form)">
+    <input type="submit" value="Join game">
   </form>
 
 </body>
   </form>
 
 </body>