Forum Moderators: open

Message Too Old, No Replies

Setting Focus using onLoad

Usability / Security Issue

         

CabinFever

11:50 am on Oct 20, 2004 (gmt 0)

10+ Year Member



Hello to all the WW'ers.

Scenario:

The use of JavaScript to set the Focus in the classic login form scenario, with username / password fields and Submit button.

So, you've already entered your username and are busily typing your password when the onLoad event kicks in and you end up with your password in full view in the username field.

Do any other quick typists with a slow connection find this issue cropping up regularly?

AWildman

12:07 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



I know I've had a problem with form elements showing up before the rest of the page. The user would type something in then the onload would cause problems. What I did was to make the form display: none until the onload at which time the last thing the onload function did was to make the form display: inline. Works like a charm.

n1ck0s

12:10 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



it happens all the time.... Yahoo! for instance. Perhaps instead of using the onLoad event, someone could place a <script>document.frm.login.focus();</scipt> just after the input itself. It might work