Thanks Jason.
Please could you tell me how I can check the required attribute. All i want to do is to stop people adding only a space in the form field to validate it. So you can type words and spaces but not just a space to validate a field.
Please help.