If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#32
|
|||
|
|||
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. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|