Password Validation Script

This javascript will help you to validate username, password. If it will display the specified page.

Features

  • You can generate the popup window.
  • Give the username and password.
  • If it is true, it will display the specified page.
  • Just copy the code into your page and use it.

Preview

Note:Username=hiox,Password=hioxindia



©hscripts.com


Downloads

Javascript code


<!--Script by hscripts.com-->
<script type="text/javascript">
function login()
{
var username=prompt("Enter usename");
var password=prompt("Enter password");
if(username=="hiox" && password=="hioxindia")
window.location="http://www.hscripts.com";
else
alert("Invalid username password");
}
</script>
<!-- Script by hscripts.com -->

HTML code


<!--Script by hscripts.com-->
<input type="button" name="login" value="Login" onclick="login()">
&copy; <a href="http://www.hscripts.com" style="color:#3D366F;text-decoration:none;cursor:pointer;font-size=13px">hscripts.com</a>
<!--Script by hscripts.com-->
  • Release Date - 07-04-2008
  • Get free version without ©copyright link for just $5/-
  • For customization of this script or any script development, mail to support@hscripts.com

Usage

  • Copy the javascript code into the head part of your HTML page.
  • Create the HTML form using the above HTML code.
  • Generate the popup window and then give the username, password.
  • The function login() is used to generate the popup window and then check the username, password. If you give correct username and password the specified page will be displayed.

License

  • The javascript (misspelled as java script) is given under GPL License.
  • i.e. Free use for those who use it as it is.
  • Free, if your modification does not remove our copyright information and links.
  • Detailed License information can be found here.
  • You can purchase the script if your requirements does not meet GPL License terms.

Related Scripts

Free Javascript Scripts