I have an odd problem I can't seem to find a solution for. I have two ValidationTextBox elements in a form, username and password. In the onBlur() function of username I call the validator function. Here I make an ajax call to the server to verify that the username is not already registered. If it is then focus is set back to the username field. That all works great. My problem is that when the user clicks on the password field (or tabs) the validator() function for that field is called and displays the tooltip for saying "password can not be empty" and the tooltip for username stating that the username is already taken is not shown.
Anyone have any ideas how to show the username tooltip instead of the password tooltip? I have tried calling an empty displayMessage("") on the password field and this does not work. It is rather annoying because the user does not know why the username field is invalid. Visually it is obvious that the field is invalid but it doesn't state anywhere that the username is already used.
120 views and no answer. I was afraid of that. Looks like I will have to move the validation to form submission instead.
I can provide the code if anyone thinks that will help but I am 99.9% sure it has to do with the order the events are fired or the way dojo/dijit handles them. If anyone has any suggestions they would be greatly appreciated.
Bookmarks