On Wed, 05 Jan 2005 16:52:14 +0000, Börni <b.******@onlinehome.de> wrote:
I'm just wondering why one cant do something like this outside of an
function:
alert(document.getElementById("edit"));
You can. More than likely the element, edit, hasn't been parsed by the
browser when the getElementById call is made. This will happen if, for
example, the relevant SCRIPT element is in the document head.
Create a SCRIPT element after the closing tag of 'edit' and include your
code.
[snip]
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.