Avatar

Correct answer by
Level 10

xfa.event.commitKey will return a value based on what was used to exit the field. A 3 means a tab was used a 1 means the mouse was used.

So you coudl write code that looks like this:

var keypressed = xfa.event.commitKey;
if (keypressed == 3){
app.alert("You exited this field by using a Tab")
}
if (keypressed == 1){
app.alert("You exited the field by using the mouse")
}

Paul

View solution in original post