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://lachy.id.au/
http://GetFirefox.com/    Rediscover the Web
http://SpreadFirefox.com/   Igniting the Web
Received on Monday, 31 January 2005 04:57:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:18 GMT