W3C home > Mailing lists > Public > www-html@w3.org > July 2006

Re: xhtml 2.0 noscript

From: David Woolley <david@djwhome.demon.co.uk>
Date: Mon, 31 Jul 2006 07:23:14 +0100 (BST)
Message-Id: <200607310623.k6V6NE201146@djwhome.demon.co.uk>
To: www-html@w3.org

[ top posting moved ]

> > > <script type='text/javascript'>
> > > <!--

In XHTML, handled by a true XHTML browser, this will not do anything
because it really will be commented out of the code.

> > > document.write("<p><a href='javascript:sword_enlarge()'><img 

You continue to use this non-standard javascript: pseudo scheme, and
that seems to be the source of most of your problems.

> > > src='thumb_sword.gif' alt='My Sword' /></a></p>");
This is invalid in true HTML, although misinterpreted by browsers so as
to be ignored, but, as this code is commented out in a true XHTML browser,
there is no point in having the / there anyway.

As I noted before, if you are going to serve XHTML to non-XML browsers, like
IE6, it is almost impossible to use script elements with inline content, 
especially when they contain [X]HTML strings, so the document.write issue
tends not to arise.

> > <a href="sword.gif" onclick="annoyingPopup();"><img 
> > src="thumb_sword.gif" alt="..."/></a>

> No that won't work because it will open the image in a pop-up *and* in 
> the window.  So it just opens the image twice.

The only problem was that he forgot to include "return false" in the
Received on Monday, 31 July 2006 06:30:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:13 UTC