Paul - that's superb - thank very much

Colm - thanks for the link - will take look

_______________________________________________________
*  Regards, 
                Richard Lovelock 
Westminster City Council - Web Support
Cap Gemini Ernst & Young
Southbank
95 Wandsworth Road
London 
SW8 2HG 
(     0870 906 7482
 
_______________________________________________________


-----Original Message-----
From: Paul Johnston [mailto:[EMAIL PROTECTED]
Sent: 28 November 2003 12:15
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] CFForm text box


This works:

<script language="Javascript">
function checkForm(myform) {
        if(myform.comments.value.match(/^\s*$/)) {
                // it's empty
                alert('You must enter a value for comments');
                return false;
        }
        else {
                return true;
        }
}
</script>

<cfform action="action.cfm" name="a">
<textarea name="comments" cols="50" rows="12"></textarea>
<input type="image" src="images/submit.gif" value="Submit Form"
onClick="return checkForm(this.form);" />
</cfform>

HTH

Paul



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


=======================================================
This message contains information that may be privileged or confidential and is the 
property of the Cap Gemini Ernst & Young Group. It is intended only for the person to 
whom it is addressed. If you are not the intended recipient, you are not authorised to 
read, print, retain, copy, disseminate, distribute, or use this message or any part 
thereof. If you receive this message in error, please notify the sender immediately 
and delete all copies of this message.
=======================================================


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to