Javascript Validation?

Hey,

I was wondering if this is possible?

I have the following javascript for validating a number of fields:


            /* <![CDATA[ */
            jQuery(function(){
                jQuery("#ValidName").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidEmail").validate({
                    expression: "if (VAL.match(/^[^\\\\W][a-zA-Z0-9\\\\_\\\\-\\\\.]+([a-zA-Z0-9\\\\_\\\\-\\\\.]+)*\\\\@[a-zA-Z0-9_]+(\\\\.[a-zA-Z0-9_]+)*\\\\.[a-zA-Z]{2,4}$/)) return true; else return false;",
                });
                jQuery("#ValidUsername").validate({
                    expression: "if (VAL.length > 4 && VAL) return true; else return false;",
                });
                jQuery("#ValidPassword").validate({
                    expression: "if (VAL.length > 6 && VAL) return true; else return false;",
                });
                jQuery("#ValidAddress").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidPhone").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidOccupation").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidFavourite").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidEnjoy").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidPub").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidOften").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                jQuery("#ValidNewspaper").validate({
                    expression: "if (VAL) return true; else return false;",
                });
                
                jQuery('.AdvancedForm').validated(function(){
				});
            });
            /* ]]> */

On this page:

http://www.thecaskaleclub.com/register/

If you try registering without filling in any fields it takes a few seconds to work out that there are fields blank…

So would it be possible with the Javascript above to show a windows error like so:


<script>window.onload = show; function show(){ alert('Missing Fields.');}</script>

I want this to appear if any fields are left blank… Is this possible?

Thanks