Rgg
Rgg

Reputation: 45

Usage - Text field after focus lost event with js

I'm creating a form questionnaire and which i want is to add record in the database after focus lost event of the text field.

I want save in a table "Usage" what the user insert before to do click (answer) other question. And if he return to that text field save the new datas too.

What simple event/plugin on javascript/jquery can i use for this ? i search and i find the plugin TextExt : http://textextjs.com/

but i didn't find any example about it and it's difficult for me use it without one.

Upvotes: -3

Views: 542

Answers (1)

martskins
martskins

Reputation: 2940

that event is generally called blur, I guess you're using jquery from your tags so yeah.. jquery has an event called blur which is basically triggered when the textfield has lost focus

I believe it should be something like this...

 $('textfield').blur(function(){
      //Code here
 })

Upvotes: 0

Related Questions