Javascript Password Validation

April 19th, 2009 by Ian O'Donnell

Nothing is worse than spending forever googling for how to accomplish a certain task only to find pages that don’t answer your question. So just to clarify, here is what we will be covering.

  • Checking Password Length
  • Matching 2 password fields
  • Giving the error to the user without reloading the page

And this is an Example too.

In the current state of web design it is extremely desireable to give errors to the user without reloading pages, especially when it comes to forms. This makes the experience smoother for the user which is what we should be aiming for.

First things first let’s just clarify the html page and css so we know all our field names etc. Here is the code I am using for this example:

?Download html.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<head>
 
    <title>Validating Password</title>
 
    <link rel="stylesheet" href="styles.css" type="text/css" />
    <script type="text/javascript">
 
    </script>
 
</head>
<body>
 
     <form>
          Password: <input type="password" id="pass1" value="" maxlength="20" onkeyup="chkpassword()" />
          <br />
          Enter Password again: <input type="password" id="pass2" value="" maxlength="20" onkeyup="chkpassword()" />
     </form>
 
     <div id="passwordAlert" ></div>
 
</body>

Ok so the html isn’t the most elegant etc :) But this will serve perfect for our example don’t worry about it :P

The script tags in the head element is where we will put our Javascript. This could of course be place in an external file but for testing it out it is quite often easier to leave it in the Read the rest of this entry »

, , , , , , , , , , , , , , , , , , , , , ,

Creating a Gameplay video: Simple and easy Method

August 6th, 2008 by admin

As a pre-emptive to a detailed blog post I have planned regarding producing high quality videos for
Youtube from any pc-game, although I will be focusing on Battlefield 2142, I am going to produce a
simple guide that is especially useful for people who may not have done this before or may not have
experience editing. the quality of the output at the end will not be that of the videos here that I
have made recently but as I said, it is mainly for beginners and will provide an excellent start
point.
What we will need for this method which will be the ‘Killcam’ method is xfire ……. and Windows
Movie maker
. That is it!

For this example I kept everything simple, I will break it down step by step and provide examples and
recommended viewing where necessary, the video I made for this tutorial of sorts is as simplistic as
it gets, a short video of the Read the rest of this entry »

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,