Events

I am facing a problem. I have a date field on the form. I have written a javascript code which checks that field date should not be greater then currentdate. I tired the code on all the events of the field but it is not giving me the proper message. Please suggest me which event I should choose. Shall I include Javascript code with the formula in the Input Validation or Translation event.

I want if the user enter into the field then on leaving the field it checks whether field date is greater then current date.

Subject: Events

I want if the user enter into the field then on leaving the field it checks whether field date is greater then current date…Shall I include Javascript code with the formula in the Input Validation or Translation event.

No, to achieve what you posted that you want, you should use the onBlur event, since (a) the validation and translation events don’t fire in a browser, (b) you can’t code javascript in those events, and (c) you said you wanted the validation to happen on exiting the field.

However, field-level validation is usually abad idea for two reasons: (1) it’s annoying to the user and (b) it simply doesn’t work; if the user never exits the field, the onBlur event never fires, does it? Use form-level validation instead.