W3C home > Mailing lists > Public > www-validator@w3.org > January 2005

Re: Scripts in (X)HTML

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Mon, 31 Jan 2005 15:57:22 +1100
Message-ID: <41FDBAB2.20900@iinet.net.au>
To: Lachlan Hunt <lachlan.hunt@iinet.net.au>
CC: Philip TAYLOR <P.Taylor@Rhul.Ac.Uk>, "Jukka K. Korpela" <jkorpela@cs.tut.fi>, DjMafia <barrerad@gye.satnet.net>, www-validator@w3.org

Lachlan Hunt wrote:
> var x = document.getElementById("xxx");
> x.appendChild(document.createTextNode("This "))
> var a = document.createElement("a");
> a.setAttribute("href", "http://chatter.flooble.com/");

I forgot to add the actual link text.  That is accomplished with the 
following very simple line:

a.appendChild(document.createTextNode("flooble chatterbox"));

I also left two semi-colons of the original, just add them to the end of 
the lines that are missing them.

> x.appendChild(a);
> x.appendChild(document.createTextNode(" is temporarily unavailable..."))

Lachlan Hunt
http://GetFirefox.com/    Rediscover the Web
http://SpreadFirefox.com/   Igniting the Web
Received on Monday, 31 January 2005 04:57:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:44 UTC