[thelist] weird error

BT Bigpant bigpant at btinternet.com
Fri Feb 8 07:27:00 CST 2002

I can see that you, like myself, prefer to write a single, generic pieces of
code. This is always good practice, but there are times when 'simple is
best'. I'm not entirely sure why the script doesn't work first time (it did
focus on refresh IE5.5 win98), but I have encountered similar problems.

You might like to add a more specific line like

I concure with James that associative elements are safer than numeric ones.

Just looking again through the code, I notice you have a hidden input type
as the first element in the form. You call the putFocus with (0,0). Surely
this is trying to focus on the hidden elements? If this is the case, why
does it work after a refresh. A quote I once read "If you don't know why
something works, it probably doesn't".

Phil Parker

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Mike Stevens
Sent: 07 February 2002 19:40
To: thelist at lists.evolt.org
Subject: [thelist] weird error

I'm getting a strange javascript error when I try to load a page.  The
javascript is supposed to bring the focus to the first field of the login
form.  For some reason, the first time I try to view the page it doesn't put
the focus and gives me the following error:

Line: 93
Char: 4
Error: Can't move focus to the control because it is invisible, not enabled,
or of a type that does not accept the focus.
Code: 0
URL: http://www.businesstravelerusa.com/admin/loin.php

If I refresh the page then it seems to work fine.  Any ideas on why this
might be happening?

For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !

More information about the thelist mailing list