Which two conditions must be met before the OnChange event for a field is executed?

Which two conditions must be met before the OnChange event for a field is executed?

Which two conditions must be met before the OnChange event for a field is executed?

A.
The field detects keystrokes.

B.
The field loses focus.

C.
The value of the field is changed by a JavaScript function.

D.
The value of the field is changed by the user.



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Jimbo

Jimbo

While I think Microsoft want you to answer A, I would argue it should say “The value in the field is altered by the user” or words to that effect. Keystrokes alone wouldn’t trigger it if the user changed the value but then put the same value back in – the field would therefore not be “dirty” and wouldn’t trigger any on change events.

Brownstone

Brownstone

From MSDN:
OnChange event
The OnChange event is available on every field. Generally, the OnChange event requires two conditions to be true:
The data in the field must change.
The field must lose focus.

Cecil

Cecil

B and D should be the answer.

Abhi

Abhi

Correct answer is – B & D.

Carlos

Carlos

The Microsoft MSDN documentation is clear:

The OnChange event is available on every field. Generally, the OnChange event requires two conditions to be true:
The data in the field must change.
The field must lose focus.

You can check it in https://msdn.microsoft.com/en-us/library/gg334701.aspx