Unconventional? I've seen a LARGE number of applications that do this sort of validation - granted most are desktop applications. In a web environment this is more of a pain to do, but still very possible. Perhaps a better word would be "Uncommon"? at least in web pages.
The unwritten standard that I've seen in web pages is to validate your data when the form is being submitted. This certainly makes writing the code easier, and removes any weird delays checking data while enter it. However, each application has it's own requirements, and some will require validation when the data is entered (i.e. a text box field that only allows numbers). I worked on a web app recently where the type of validation to be done changed on the fly depending on the value of some other form elements. This validation had to happen as data was entered, when the field lost focus, and when the form was submitted. It took a fair bit of code to make it happen, but it wasn't impossible, and actually performs pretty good considering network lags and all.... My thoughts... Shawn Grover -----Original Message----- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 11:24 AM To: CF-Talk Subject: RE: Function? That is unconventional. Do it this way... Put an ONCLICK attribute in the submit button. That way, if u click it, it will run your javascript functions which u will write to validate the fields. If something is wrong, put out a pop up message. if nothing is wrong, have it submit the message. -----Original Message----- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 12:20 PM To: CF-Talk Subject: RE: Function? Well I want to validate certain fields throughout the application and use the submit for a master save of all of the data associated with the form. -----Original Message----- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 1:01 PM To: CF-Talk Subject: RE: Function? Why not just let it happen when the user clicks a submit button? Onexit AKA OnBlur is creepy and confusing. but it's possible to do it your way. First write a javascript function to submit the form. THen in the form field for the SSN, add in this attribute.. onblur="nameoffunction();" that way, when the user moves out of the field, it calls the javascript, which submits the form magically. walla! -----Original Message----- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 11:52 AM To: CF-Talk Subject: Function? I was curious if it is possible for me to write a function that will onExit from a form field cerify that data against our database? For examples if I enter in my SSN then onexit the ssn would be passed back to the server and a query would execute Either returing the results of my query (firstname, lastname etc...) or it would send back no then I would display a error message. Please advise... Seems possible im just not sure how to do it...exactly... Thanks for your help Kris Pilles Website Manager Western Suffolk BOCES 507 Deer Park Rd., Building C Phone: 631-549-4900 x 267 E-mail: [EMAIL PROTECTED] ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

