Skip to main content
Inspiring
October 26, 2011
Answered

bind cfc to onBlur event

  • October 26, 2011
  • 1 reply
  • 1042 views

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?

This topic has been closed for replies.
Correct answer -__cfSearching__-

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

1 reply

Inspiring
October 26, 2011

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.

-__cfSearching__-Correct answer
Inspiring
October 26, 2011

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

ionAuthor
Inspiring
November 4, 2011

thanks a lot, works