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

Re: xhtml 2.0 noscript

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Mon, 31 Jul 2006 14:03:56 +0200
To: magick <jasper.magick@gmail.com>, www-html@w3.org
Message-ID: <op.tdjygusismjzpq@acer3010.lan>

On Mon, 31 Jul 2006 05:26:33 +0200, magick <jasper.magick@gmail.com> wrote:

> But when it comes to something like this, can you really say <noscript>  
> isn't needed?  I think I have an example you'd have to agree with, that  
> <noscript> *is* needed here.
> <script type='text/javascript'>
> <!--
> document.write("<p><a href='javascript:sword_enlarge()'><img  
> src='thumb_sword.gif' alt='My Sword' /></a></p>");
> //-->
> </script>
> <noscript><p><a href='sword.gif'><img src='thumb_sword.gif' alt='My  
> Sword' /></a></p></noscript>

Take a look at what it produces in the two cases:

   <a href='javascript:...'><img src='thumb_sword.gif' alt='My Sword' /></a>
   <a href='sword.gif'     ><img src='thumb_sword.gif' alt='My Sword' /></a>

Identical except for the content of the href attribute.

This is exactly what I was referring to in my very first reply to you:

"you provide the initial content, and then modify it with DOM access  
methods, rather than using document.write. As a result, you don't need a  
method of providing <noscript> content."

In this case your initial content is

   <a href='sword.gif'><img src='thumb_sword.gif' alt='My Sword' /></a>

and then you use DOM access methods to change the href attribute.

Best wishes,

Steven Pemberton
Received on Monday, 31 July 2006 12:04:26 UTC

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