Skip to main content
Inspiring
August 6, 2013
Answered

CFINPUT TEXT ONEXIT

  • August 6, 2013
  • 1 reply
  • 511 views

I would like to have triggle JavaScript when user exit input text field.

I just check ColdFusion document. it does not have on exit event, but it has OnValidate.

I thought that onValidate should triggle when user exit the control, it seems the JavaScrip does not triggle.

I would like to know any event triggle for CFINPUT text field when user exit the contorl.

Your help and information is great appreciated,

Regards,

Iccsi,

    This topic has been closed for replies.
    Correct answer Carl Von Stetten

    @Iccsi,

    There are not direct "hooks" to all of the JavaScript event triggers in the ColdFusion-built form controls (like CFINPUT).  However, you should be able to write your own JavaScript code.  If you are comfortable using jQuery, you can use the .blur() event handler (or the on("blur", handler) syntax if you don't want to use the .blur() shortcut).  Here's a link to the jQuery API docs.

    HTH,

    -Carl V.

    Message was edited by: Carl Von Stetten - added link to jQuery docs.

    1 reply

    Carl Von Stetten
    Carl Von StettenCorrect answer
    Legend
    August 6, 2013

    @Iccsi,

    There are not direct "hooks" to all of the JavaScript event triggers in the ColdFusion-built form controls (like CFINPUT).  However, you should be able to write your own JavaScript code.  If you are comfortable using jQuery, you can use the .blur() event handler (or the on("blur", handler) syntax if you don't want to use the .blur() shortcut).  Here's a link to the jQuery API docs.

    HTH,

    -Carl V.

    Message was edited by: Carl Von Stetten - added link to jQuery docs.

    iccsiAuthor
    Inspiring
    August 7, 2013

    Thanks a million for helping and information,

    Regards,

    Iccsi,