You need to do this with inline actionscript, instead of javascript.

try this:

<cfform format="flash">
<cfinput type="Text" name="jsPass1" label="pass1">
<cfinput type="Text" name="jsPass2" label="pass2">

<cfinput type="Button" name="foo" value="submit"
onClick="if( jsPass1.length == 0 ){ alert('Password cannot be blank.'); }
else if( jsPass1.length < 4 ){ alert('Password must be at least 4
characters.'); } else if (jsPass1.text != jsPass2.text){ alert('Password
and Confirmation must match'); } else { submitForm(); }">

</cfform>

hth,
---nimer


"ccsimmons" <webforumsuser@macromedia.com> wrote in message
news:cusutu$si7$1@forums.macromedia.com...
>I really like the look of the flash forms for a project I am working on,
>but I
> need to be able to do all the validations I was doing with regular old
> HTML
> forms and JavaScript. Previously the following javascript was called
> onSubmit
> of the form. It checks to see if 1 field is blank, compares 2 fields
> within
> the form to be sure they are the same, and it also checks to see if 1 of
> the
> fields is at least 4 characters. Any help with this would be extremely
> appreciated.
>
> <script language="JavaScript">
> function doCheck(){
> var jsPass1 = MainForm.txtPassword.value
> var jsPass2 = MainForm.txtPassword2.value
>
> if (jsPass1 == ""){
> alert("Password cannot be blank.")
> return false;
> }
>
> if (jsPass1.length < 4){
> alert("Password must be at least 4 characters.")
> return false;
> }
>
> if (jsPass1 == jsPass2){
> return true;
> }else{
> alert("Password & Confirmation must match.")
> return false;
> }
>
> }
> </script>
>