Tag Archives: javascript

The Poor Man’s Client-Side Authentication

Recently I had to whip up a quick Web page to disseminate some information requiring a semblance of security in the form of a user name and password. Furthermore, I had HTML and Javascript but no server-side scripting at my immediate disposal. What I came up with as a solution was this.

  • Create a form for entering user name and password. This doesn’t have to be any more complicated than two input fields:
<label>User name:</label>
<input type='text" id='username" />
<label>Password:</label>
<input type='password" id='password" />
  • Add a button to submit the form:
<input id="btnSubmit" type="button" value="Submit" onclick="javascript:go()" />

Continue reading The Poor Man’s Client-Side Authentication