In Xul, how to call focus to an element after the window was loaded?
A:
This page on Focus and Selection and this one On page load should help you out, I think.
window.addEventListener("load", function(){document.getElementById('ele-id').focus()}, false);
If the element is not focusable by default, then make it so with:
style="-moz-user-focus: normal;"
Make sense?
Erik Vold
2010-10-23 20:55:09
I had forgoten the `document.` part when getting the element by id. In some parts it's not needed.. sad.. Thanks!
Tom Brito
2010-10-26 17:25:48