Copy link to clipboard
Copied
is there a way to bind a cfc method to the onBlur event of a text field? in other words, after the user typed something in a text field, can i check that string against a db query and see if it`s a duplicate before submitting the form?
With regard to capturing the event, yes it is possible using "@". See the event value section for more details.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=ajaxdata_04.html
Copy link to clipboard
Copied
Probably, but this reply concerns what happens if it is a duplicate. With onblur(), or onchange() If you simply display some information to the user, that user can ignore the information and submit the form anyhow. That may or may not be what you want.
Also, if you are using onblur(), make sure you take into account that the user could exit the field without having entered any text.
Copy link to clipboard
Copied
With regard to capturing the event, yes it is possible using "@". See the event value section for more details.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=ajaxdata_04.html
Copy link to clipboard
Copied
thanks a lot, works