ksa.dk
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by ksa.dk
-
-
I know how to set focus on a specific input control, e.g. a text box, e.g.:
<script type="text/javascript">
document.Login.brugernavn.focus();
</script>
Now I have a web page with no input controls. The problem is that Page Down doesn't work until I click somewhere on the form to have it receive focus.
I would like that to happen automatically when the page loads, but I haven't found a solution.The page contains two forms with tables inside. I have tried to use focus() on the form or on a (disabled) input control, but nothing works.
Can anybody help me? Thanks in advance...
Set focus on form (not input control)
in JavaScript
Posted
Thanks. Unfortunately I can't get setfocus() to work (in Chrome) on anchors or elements with tabindex. However, I succeeded in getting it to work with a readonly input element in one case and am still experimenting with other cases.