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

Re: xhtml 2.0 noscript

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Tue, 25 Jul 2006 12:40:32 +0200
To: "Johannes Koch" <koch@w3development.de>, www-html@w3.org
Message-ID: <op.tc8qlupgsmjzpq@acer3010.lan>

On Mon, 24 Jul 2006 19:24:30 +0200, Johannes Koch <koch@w3development.de>  

> I think, whether you need an alternative (noscript) for the scripting  
> depends on what is done in the script. If essential functionality is  
> added via scripting, a noscript alternative _is_ needed.

Here is an example of how to do it without noscript (there are others).  
<noscript> is only needed when document.write is used.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
   <title>No script alternative</title>
   <style type="text/css">
     .secret {display: none}
   <script type="text/javascript">
     function go() {
         return true;
<body onload='go();'>
   <h1>A noscript alternative</h1>
   <p id='noscript'>This document has no script</p>
   <p id='hasscript' class='secret'>This document has script</p>

Received on Tuesday, 25 July 2006 10:41:05 UTC

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