You can do this in Javascript and CF...

You would use the onBlur event to call your function.

Your function would likely call a CF page into a IFrame, frame, processing
window, etc. and that page would take whatever action is necessary...

i.e.

function ConfirmSSN(sSSN) {
        document.all.WorkFrame.src = "confirmSSN.cfm?SSN=" + sSSN;
}

 . .

<input type="Text" . . .  onblur="ConfirmSSN(this.value);">

<iframe id="WorkFrame" name="WorkFrame" hieght="0" width="0"></iframe>


CONFIRMSSN.CFM:
===============

<cfparam name="URL.SSN" default="">

..  (other code here to process the SSN) ...

<cfif ValidSSN eq "No">
        <script language="javascript">
                alert("Invalid SSN");
                window.parent.document.forms[0].SSN.focus();
        </script>
</cfif>


Hope this helps....  (well, it's a start at least...)

Shawn Grover

-----Original Message-----
From: Kris Pilles [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 10: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]



______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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

Reply via email to