Question
how to get focus on a button in ANCC HTML5
I have 6 input texts and a submit button set on visible = false.
When all 6 input texts are filled in the submit button has visible = true. This works fine but I want the button then to get the focus. I can get focus on the input text but I am not sure how to do it with the submit button.
function checkIfDone() {
if (result1.length != 0 && result2.length != 0 && result3.length != 0 && result4.length != 0 && result5.length != 0 && result6.length != 0) {
root.submitBtn3.visible = true;
} else {
root.submitBtn3.visible = false;
}
}
Each input has this code:
function A_change(evt) {
result1 = [];
result1.push(evt.target.value);
// move to next imput field
$("#B").select();
}
// get value
$("#dom_overlay_container").on("change", "#A", A_change.bind(this));
// get submit if all input fields are filled in
$("#dom_overlay_container").on("keyup", "#A", checkIfDone.bind(this));
