W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2002

Re: Using Form Elements for Pages only Intended for Printing

From: Jim Ley <jim@jibbering.com>
Date: Thu, 10 Jan 2002 15:34:44 -0000
Message-ID: <026201c199ec$54292a00$ca969dc3@emedia.co.uk>
To: "WAI Interest Group" <w3c-wai-ig@w3.org>
"Jon Hanna" <jon@spinsol.com>

> > Well it's better (but having it as an external script seems very
> > wasteful.)
>
> It hides the script from non js-aware browsers in a way that is both
> valid HTML (which may choke on <[CDATA[) and valid XHTML (which
> doesn't guarantee that anything in a <!--comment--> won't be deleted
> before parsing

Which isn't a problem - especially as there aren't real XHTML browsers
about...

>). Besides which external scripts have a speed
> advantage if the script is used more than once (albeit this only
> really happens with larger scripts),

For a 100byte script it's a lot more than once, and assumes you visitors
both visit multiple pages, and your cache settings are all friendly.

> and it makes source code easier
> to manage especially in the common situation where not all the people
> working on the HTML are familiar with js.

So you have to teach them to add a button with <script ... > it's an
argument, but I don't feel it's a good one.

>  also why have
> > the DIV?
>
> <script> is a block level element. As such it cannot appear in an
> inline situation. Also if a script document.write's then it should be
> seen as being replaced by that code.

It should? which specification states this? it's certainly not the result
in any parsers I've seen (they include both.)

Jim.
Received on Thursday, 10 January 2002 10:36:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:00 GMT