On Mar 11, 10:47 pm, Rob Tanner <[email protected]> wrote: > I'm writing a self-service password reset program and I have two > independent events that can both be triggered at the same time, but > they conflict. Folks just simply changing their password would enter > their ID and tab to the password field and enter their password. When > the text box looses focus (onBlur), so long as there is an entry in > both the user ID and password text boxes, an async call is triggered > that authenticates them. At that point, the text boxes for entering > your new password are unlocked. When someone forgets their old > password or the password has expired, they still have to enter their > user ID and then they press a "don't know" that asks them a series of > questions. That's fine and good, so long as the person doesn't enter > anything in the current password field. But when anything has been > entered in the password field and they hit the "don't know" button, > the password field looses focus and an authentication process is > triggered resulting in an error. > > So, my question is: when the "don't know" button has been pressed, how > can I prevent the async call that does the authentication?
You could make the async call from a timer that you schedule() on the password field's onblur and cancel() from the "don't know" click handler. But a better way would probably be to either not do the async call on "onblur", and/or handle the authentication error "gracefully" (it could be narrowed to just not show an error when you're in the "don't know" state). Generally speaking, as far as UX is concerned, I don't think you should be "locking" your users into doing things in a specific order (this includes being able to start filling the "new password" fields whereas the async call is in progress, which should also give's it time to complete so you can conditionnally enable/disable the "change password" button; and at any time the user should be able to click the "don't know" button). Well, this is just my very own opinion... -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
