title: how to encode password in javascript?
body: <p>I have password textbox which allows the user to enter any type of characters with the password. But registration fails when the user uses a password like say 'mypass@676/my&amp;pass/my%pass' but when other characters are used he is able to register. Is it due to password not getting encoded in the front end?</p>
  
  <p>I posting the registration url to my register service since it is a url if the password is mypass@676 the system takes only upto mypass and ommits the other characters and as a result it is failing.</p>
  
  <p>My code in javascript is like this,</p>
  
  <p><code>data+= "&amp;password="+$(formID).find('input[id=password]').val();</code> and this will go to my service as it is.</p>
  
  <p><em><strong>Issues:</em></strong> </p>
  
  <ol>
  <li><p>If i encode my password in javascript say my password is
  "my%passw" so when i encode "my%25pass" and during login which i
  should give?</p></li>
  <li><p>Ok if i encode again during login what will happen
      to my existing users passwords will it get encoded?</p></li>
  </ol>