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 |
#33
|
|||
|
|||
Javascript is enabled but it does not work.
On 11/11/18 7:52 AM, Mayayana wrote:
[snip] Yes. Confusing, now that you mention it. w3schools says you can use NAME as a scripting object. The normal use of NAME is to name the information submitted by a form, what the INPUT tag is normally used for. 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. When I first wrote that, if was IE-only (plus Presto versions of Opera), which was OK since I wanted something that would work on IE4. Recently, it's working on modern browsers too. 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. There seems to be a problem here, it's IE4 (https://en.wikipedia.org/wiki/Internet_Explorer_4). I wasn't writing JS code at the time IE4 was current, so if there are any other ways I don't know them. Normally that would be specifically for typing into. This works fine: LABEL ID="clock" SIZE=30Needs javascript/LABEL ... clock.innerText = mons[mo] + ' ' + da ....etc. IE5 was the first version of IE to allow JavaScript access to the text within a HTML tag. I use that on all later (and non-IE) browsers. The INPUT tag provides a way to get around that limitation. Notice that I'm changing an attribute (value) rather than a text node. BTW, I noticed you put quotation marks around "clock", but not around "30". -- 44 days until the winter celebration (Tue Dec 25, 2018 12:00:00 AM for 1 day). Mark Lloyd http://notstupid.us/ "The idea of the sacred is quite simply one of the most conservative notions in any culture, because it seeks to turn other ideas --uncertainty, progress, change -- into crimes." --Salman Rushdie |
Thread Tools | |
Display Modes | Rate This Thread |
|
|