[thelist] js problem

Fernando Gómez fgomez at criba.edu.ar
Fri Sep 13 15:47:01 CDT 2002


From: "Tom Dell'Aringa" <pixelmech at yahoo.com>
Sent: Friday, September 13, 2002 5:32 PM
Subject: [thelist] js problem


> var focusField = document.getElementById("lastname");
> (i've tried it with or without the var)
>
> The global script (for all pages) has this function:
>
> function defaultFocus()
> {
> focusField.focus();
> }

May be the variable has not been defined yet when defaultFocus() is
executed? What if you try:

function defaultFocus()
{
  if (focusField) focusField.focus();
}

Just a suggestion...

Fernando Gómez





More information about the thelist mailing list