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
onclick.
Received on Monday, 31 July 2006 06:30:28 GMT

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