W3C home > Mailing lists > Public > www-html@w3.org > June 2000

Re: the onload event

From: Ian Graham <igraham@smaug.java.utoronto.ca>
Date: Sun, 18 Jun 2000 15:12:46 -0400
To: Lars <Lars_Reith@bigfoot.de>
cc: www-html@w3.org
Message-ID: <Pine.SGI.4.05.10006181510300.103046-100000@smaug.java.utoronto.ca>
This is actually an inappropriate letter to this mailing list.
The topic/scope of this list is defined as:

  This is the public mailing list for technical discussion among those
  interested in enhancing the Hypertext Markup Language (HTML) or 
  building systems that support HTML. It is explicitly intended
  for the collaborative design of new systems, software, protocols, 
  and documentation which may be useful to the HTML developer community. 


Questions of script handling/browser behavior, etc, are best posted
to appropraite newsgroups, such as comp.lang.javascript, or
comp.infosystems.www.authoring.html.

Ian

On Sat, 5 Feb 2000, Lars wrote:

> <html>
> <head>
>  <title>Untitled</title>
> <script>var information</script>
> <script>
> function init()
> {information="Hello there"}
> </script>
> </head>
> 
> <body onload="init()">
> <script>
> document.writeln(information)
> </script>
> 
> 
> </body>
> </html>
> 
> This time, I defined the variable in the very beginning of the document. This seems to work since no error accurs. However, the value of the variable remains "undefined", that text will show up on the screen when the body is executed. This leads to the conclusion that the onload trigger is not activating the init() function. Is this a problem of the onload trigger event?
> 
Received on Sunday, 18 June 2000 15:12:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:43 GMT