[thelist] weird error

Syed Zeeshan Haider zeeshan_paki at yahoo.com
Fri Feb 8 07:04:00 CST 2002


Hi Mike,
I am not an expert but I think my point of view will also help you.
Despite of others' answers to your question, I think the problem is with
the way script runs. May be you have added the script for focusing
before that field's syntax to which you want focus. It means (perhaps)
the script loads before the loading of field and script searches for the
field when actually there does not exist any field. Try to add the
script after the HTML syntax of field.
Consider following example:

<form name="MyForm">
<input type="text" name="theField" value="">
</form>
<script language="JavaScript">
document.MyForm.theField.focus()
</script>

Hope this helps.

Syed Zeeshan Haider.
http://syedzeeshanhaider.faithweb.com/

----- Original Message -----
Message: 8
From: "Mike Stevens" <mstevens at members.evolt.org>
To: <thelist at lists.evolt.org>
Date: Thu, 7 Feb 2002 14:39:50 -0500
Subject: [thelist] weird error
Reply-To: thelist at lists.evolt.org

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?



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the thelist mailing list