[thelist] Direct focus on login

Andreas Wahlin Andreas.Wahlin at ufl.gu.se
Mon Nov 22 08:53:17 CST 2004


I want to place the cursor on the userid area of a loginscreen, so
user's won't have to click on it. Should be easy javascript:

<body onload="document.getElementById("userid").focus();">
<input type="text" id="userid" name="userid" />
</body>

However, the cursor won't start to blink/being active unltil I click
once on the actual page, (though that click can be anywhere). This
defeats the entire purpouse. It's like, sure the input is focused, but
the window isn't focused, but it is. I have tried refreshing the window
and I've tried opening a fresh window and paste the url and then go
there, and nothing makes it so I can start typing directly without first
clicking somewhere on the window.
(hope this hasn't been asked before, I did some googling)

Andreas


More information about the thelist mailing list