Re: Handling of script attributes (was Re: HTML 4.0 draft available) (fwd)

Scott Matthewman (
Thu, 10 Jul 1997 11:59:17 +0100

From: (Scott Matthewman)
To: <>, "MegaZone" <>
Subject: Re: Handling of script attributes (was Re: HTML 4.0 draft available) (fwd)
Date: Thu, 10 Jul 1997 11:59:17 +0100
Message-ID: <>

> Once upon a time Scott Matthewman shaped the electrons to say...
> >I do think, though, that the insertion of script events into tags should
> >discouraged more firmly, to be replaced by binding from a script in the
> ><HEAD> element. Individual event attributes in tags should be
> >to be replaced by a SCRIPT attribute, in much the same way as the STYLE
> >attribute can incorporate style changes.
> You must have a way to bind event handlers to elements - no way around
> All the event handlers define are the crossover points between HTML and
> scripting language.  Note that the language itself is NOT defined - only
> the event handlers.  These are universal elements and I consider them no
> different from a CLASS attribute.

Yup, I agree. I *thought* I'd said so: 

| But the content of HTML is by its very nature interactive, so there needs
| to be some means of applying controls to certain events. Specifying which
| events a UA should monitor in the DTD will help to standardise function
| across platforms.

Apologies if my original post wasn't clear! I just don't see why each event
handler requires a separate attribute.

> You can inline scripts, sure - you can also inline style sheets. 
> an inline script makes more sense.  A simple status bar change can be
> more efficiently then calling it as a seperate function.  But a large
> image array script should be called seperately.  Note that you can
> use the SRC attribute on a SCRIPT element to call an external script.

Personally, I think the <SCRIPT SRC="myscript.js"></SCRIPT> is messy - it
certainly goes against the spirit, if not the letter of HTML! [Since I
started writing this, I've received Liam Quinn's post, which suggests a
<LINK> alternative - I agree!]

> >1) Main document, including text, graphics and hyperlinks
> >2) Style sheet, governing presentational output
> >3) Script, governing interactivity.
> To me this does not make sense.  Style sheets and scripts can be called
> external files when it makes sense, they can be included in header blocks
> when it makes sense, and they can be inlined when in makes sense.

Exactly - but most of the time it makes sense to separate the three, while
retaining relationships between them.