How do I force focus to a specific field and invoke an error on it?
We have a required field. If the user clicks the process button with nothing in it, I want to draw that to their attention. Currently I'm putting up an Alert box, but I'm not sure how that would play out in JAWS. What I want to have happen is the cursor put in the field and an error notice appear just as it does if they enter an alpha in the field.
<mx:TextInput id="txt" />
private function showError():void
txt.errorString = "ERROR";
hope this helps,
Since it's a required field, I'm guessing that you are using a validator to validate the entered value. If that's the case, then it's quite simple: use the focus manager to focus in your component ( or simply use yourComponent.setFocus(); ) and force a call to the validator. Since you are forcing validation but no valid data has been enetered into the field, it should make the borders red and add that error tool tip that you are looking for.
I hope I got your problem right. Good luck.
EDIT: Take a look at this link: http://blog.flexexamples.com/2008/09/23/setting-focus-in-flex-using-the-focus-manager/
Between you two I'm getting answers galore. Thanks for the help!