if you get it right, it's usually not a problem. perhaps if you were trying to do your own validation on the same fields as CF validates, then there might be an issue.
Duncan Cumming IT Manager http://www.alienationdesign.co.uk mailto:[EMAIL PROTECTED] Tel: 0141 575 9700 Fax: 0141 575 9600 Creative solutions in a technical world ---------------------------------------------------------------------- Get your domain names online from: http://www.alienationdomains.co.uk Reseller options available! ---------------------------------------------------------------------- ---------------------------------------------------------------------- "Giles Roadnight" To: <[EMAIL PROTECTED]> <[EMAIL PROTECTED] cc: ght.name> Subject: RE: [ cf-dev ] and javascript whizzes around? 28/05/2003 14:04 Please respond to dev Is that a good idea using your own validation code with a CFform using cf validation? Whenever I have tried that things have gone horribly wrong as the the CF validation code seems to confuse the js that I have written. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 28 May 2003 13:27 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] and javascript whizzes around? <cfform name="register" onSubmit="return CheckValues()"> <script language="javascript"> function CheckValues() { if (document.register.password1.value != document.register.password2.value) { alert("The values for 'password' and 'confirm pasword' are different. Please make sure both fields are the same."); return false; } return true; } </script> something like that. Duncan Cumming IT Manager http://www.alienationdesign.co.uk mailto:[EMAIL PROTECTED] Tel: 0141 575 9700 Fax: 0141 575 9600 Creative solutions in a technical world ---------------------------------------------------------------------- Get your domain names online from: http://www.alienationdomains.co.uk Reseller options available! ---------------------------------------------------------------------- ---------------------------------------------------------------------- "Ian Westbrook" To: "cfug dev list" <[EMAIL PROTECTED]> <[EMAIL PROTECTED] cc: eam.net> Subject: [ cf-dev ] and javascript whizzes around? 28/05/2003 13:05 Please respond to dev Hi I'm doing a user registration form, and I want to make sure that the 'password' and 'password confirm' fields are the same _before_ the form is submitted. I thought about an onBlur event.. this is the code I'm using: <cfif IsDefined("session.loggedin")> <cfquery datasource="#dsn#" name="getuser"> SELECT * FROM users WHERE id = #session.userid# </cfquery> </cfif> ... <cfform name="register" action="#cgi.SCRIPT_NAME#" method="post"> ... <tr> <td align="right"><b>choose/change password</b></td> <td> <cfinput type="text" name="password1" required="yes" <cfif IsDefined("session.loggedin")> value="<cfoutput>#getuser.password#</cfoutput>" </cfif> message="please choose or modify your password"> </td> </tr> <tr> <td align="right"><b>confirm password</b></td> <td> <cfinput type="text" name="password2" required="yes" <cfif IsDefined("session.loggedin")> value="<cfoutput>#getuser.password#</cfoutput>" </cfif> message="please confirm your password"> </td> </tr> what I want is something like this for the password2 field (my javascript not v. good ;-) onBlur="CheckValues();" then the function would be: <script language="javascript"> function CheckValues() { if (register.password1.value != register.password2.value) { alert("The values for 'password' and 'confirm pasword' are different. Please make sure both fields are the same."); } } </script> would this work in conjunction with a cfinput, or would my script confuse the CF validation? I haven't tested this yet - wanted to get some feedback on it (while I write the rest of the form before testing...). I figure I can use the CF validation to make sure there's a value for password2 before the form is submitted, then my own script to make sure the two password values are the same... _form_.register.password1.value...? TIA Ian W Ian Westbrook, FutureDream Media Limited, (W): www.futuredream.net (E): [EMAIL PROTECTED] (T): +44 (0) 1303 258 985 (M): 07939 510 812 This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding any comments, opinions, information or conclusions expressed in this message are those of the originator, not of FutureDream Media Ltd, unless otherwise explicitly and independently indicated by an authorised representative of FutureDream Media Ltd. -- ** 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] -- ** 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] -- ** 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]