Which brings me to my next question; is there a way to call the function
I was using to validate my basic form from within the flash form?  Or is
there some way to add to the basic check it does within the flash form
itself? I had been using the following to check the field:

>From flash form:
<cfinput type="text" name="MR_Num" label="MR##:" width="50"
required="yes" validate="integer" maxlength="8" value="" />

My old function called onsubmit:


function validateForm() {
                var allOk = true;
                var errorString = "The following is required:\n";
                
                        
                        
                // check MR Number
                if (!document.PTOTForm.MR_Num.value) {                  
                        allOk = false;
                        errorString += "\n- Medical Record number";
                }
                
                
                // check to see if they've entered only numbers
                if (isNaN(document.PTOTForm.MR_Num.value)) {
                        allOk = false;
                        errorString += "\n- MR number must be numeric";
                }       
                
                // require MR number at least 8 digit length
                if (document.PTOTForm.MR_Num.value.length < 8 ||
document.PTOTForm.MR_Num.value.length > 8) {
                        allOk = false;
                        errorString += "\n- MR number must be 8 digits";
                }                               
        

                        if (!allOk)             
                {
                        alert(errorString);
                        return false;
                } 
                
                return allOk;
        }       


TIA Bob

-----Original Message-----
From: Imperial, Robert [mailto:[email protected]] 
Sent: Wednesday, March 18, 2009 9:41 AM
To: cf-newbie
Subject: RE: cfform type=flash


Thanks Rob, this is all new to me as I've always used ye ole standard
html forms and roll your own error handling scripts.

-----Original Message-----
From: Rob Parkhill [mailto:[email protected]] 
Sent: Tuesday, March 17, 2009 8:02 PM
To: cf-newbie
Subject: Re: cfform type=flash


Bob,
Add some label attributes to your form fields, that way you can see
which is
which, and where the * are associated.

Rob



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4461
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to