In case of OnChange event, at times we need to do some validation and if the validation fails we want the focus to be set back to the same attribute.
We can make use of the following JScript for that
var oField = crmForm.all.crm_myfield;
oField.onblur = function() {
oField.SetFocus();
oField.onblur = null; }
oField.SetFocus();
or
set focus on some other field and then setting it back to our field
Bye..
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.

Send me more details usage of javascript in customization of CRM 4.o
LikeLike