View Single Post
  #91  
Old November 11th 18, 01:52 PM posted to alt.windows7.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Javascript is enabled but it does not work.

"Mark Lloyd" wrote

| It didn't work because you have NAME="clock".
| (Though you skipped the quotes, which is not proper
| HTML. I don't know whether that could cause problems.)
| The NAME attribute *is* IE-only.
|
| Not for the INPUT tag, which I had to use.
|

Yes. Confusing, now that you mention it. w3schools
says you can use NAME as a scripting object. In my
experience that's not true, so I just avoid it altogether
unless I need something like multiple unique IDs in an HTA.
That's what I meant above -- that using it in scripting
as an object variable is IE-only. I guess ID also started
making more sense when CSS became popular, because
that treats ID as a unique referrer as well -- essentially
an object variable.

But NAME is used as an object of sorts with INPUT, to
identify a field. And for an OBJECT PARAM or META
tag, NAME is actually a keyword! Weird stuff.

Also, I don't get why youy say you had to use INPUT.
Normally that would be specifically for typing into. This
works fine:

LABEL ID="clock" SIZE=30Needs javascript/LABEL
....
clock.innerText = mons[mo] + ' ' + da ....etc.



Ads