How do I get this validationTextBox to focus?

Posted by Anurag Chaudhury on Stack Overflow See other posts from Stack Overflow or by Anurag Chaudhury
Published on 2012-07-09T02:41:58Z Indexed on 2012/07/09 3:15 UTC
Read the original article Hit count: 99

Filed under:
|
|

After performing an ajax request if the input in the form was wrong I am trying to get this validatationTextBox to be focussed on and display an indicator message showing the problem.

The code is:

dijit.byId("passwordField").focusNode.focus()

The form element is as mentioned a validationTextBox.

The matter that is confusing me even further is that before in dojo 1.5, this piece of code was simply dijit.byId("passwordField").focus() and this worked fine. How can I fix this?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about dojo