Re: xhtml 2.0 noscript

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:
http://lists.w3.org/Archives/Public/www-html/2006Jul/0039

"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