Hi Darren, what's happening is the form is doing the validation but
it's still submitting. In you preparePage() function  you need to add
an event handler for the form.onsubmit() that returns false unless the
form validates.

something like

function prepareForms() {
        for (var i=0; i < document.forms.length; i++) {
                var thisform = document.forms[i];
                thisform.onsubmit = function() {
                        return validateForm(this);
                }
        }
        return false;
}

Jeremey has an example on
http://www.domscripting.com/domsters/contact.html or have a look at my
comments form.

Best of luck,

Richard

--
DonkeyMagic: Website design & development
http://www.donkeymagic.co.uk
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to