title: A href onclick not working
body: <p>Hey I know its been asked before but those forums don't have the answer as per my code! </p>
  
  <pre><code>&lt;a href="#"  class="button dark"
                     value="Register" 
                     onclick="return regformhash(this.form,
                                     this.form.username,
                                     this.form.email,
                                     this.form.password,
                                     this.form.confirmpwd);" &gt;Register&lt;/a&gt; 
  </code></pre>
  
  <p>In the code above it gives me an error Uncaught SyntaxError:</p>
  
  <blockquote>
    <p>Unexpected token ILLEGAL in thw chrome console. </p>
  </blockquote>
  
  <p>It works perfectly using input type= button but in that case the predefined styles "dark button" don't work. I don't want to mess with the CSS so could anyone tell me how to fix this?</p>
  
  <p><strong>P.S.</strong> No the quotes don't have a problem, any help would be appreciated! Thanks.</p>
  
  <p>UPDATE: the form code as well:</p>
  
  <pre><code>&lt;form action="&lt;?php echo esc_url($_SERVER['PHP_SELF']); ?&gt;" 
                  method="post" 
                  name="registration_form"&gt;
                  First name: (required)&lt;input type="text" name="firstname"/&gt;
                  &lt;br&gt;
                  Last name: (required) &lt;input type="text" name="lastname"/&gt;
                  &lt;br&gt;
                  Company: &lt;input type="text" name="company" /&gt;
                  &lt;br&gt;
                  Contact number: &lt;input type="text" name="contact" /&gt;
                  &lt;br&gt;
                  Username: &lt;input type='text' 
                  name='username' 
                  id='username' /&gt;&lt;br&gt;
                  Email: &lt;input type="text" name="email" id="email" /&gt;&lt;br&gt;
                  &lt;br&gt;
                  Password: &lt;input type="password"
                               name="password" 
                               id="password"/&gt;&lt;br&gt;
                  &lt;br&gt;
                  Confirm password: &lt;input type="password" 
                                       name="confirmpwd" 
                                       id="confirmpwd" /&gt;&lt;br&gt;
              &lt;a href="javascript:regformhash(this.form,
                                     this.form.username,
                                     this.form.email,
                                     this.form.password,
                                     this.form.confirmpwd);"  class="button dark"
                     value="Register" 
                     &gt;Register&lt;/a&gt; 
          &lt;/form&gt;
  </code></pre>