Form validation can help to reduce the amount of bad data that gets saved to your database. In this article, find out how you can write a simple JavaScript form validator for basic client-side validation, and learn a little bit about JavaScript OOP in the process as well.
You can create an instance of the Band object like this:
<script language="JavaScript">
// object instance
obj = new Band();
</script>
Note the all-important "new" keyword - this is how JavaScript knows that you're trying to create an instance of an object, rather than merely running a function.
The code above creates an instance named "obj" of the object Band. You can verify that it is indeed an object by popping up an alert().
<script language="JavaScript">
obj = new Band();
alert(obj);
</script>