Forum Moderators: open

Message Too Old, No Replies

Not Valid XHTML 1.0 Transitional

         

aspr1n

1:29 am on Dec 11, 2002 (gmt 0)

10+ Year Member



Eek! Nasty error to be getting from the W3C parser.

I have two tags causing it:

One is a javascript event 'onChange' for a jump down drop menu, which the parser claims 'no attribute "onChange"'

I get the same error against an 'onClick' event.

Anyone got any solutions or am I missing something?

cheers,

asp

korkus2000

2:02 am on Dec 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried them all lower case like onclick?

choster

6:08 pm on Dec 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



All lowercase was also suggested in an earlier thread [webmasterworld.com].

A couple of sources say that onchange is valid only inside of forms, and onclick is "Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements." Could that be related?

g1smd

10:07 pm on Dec 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So, inside which tags are you using those two attributes?

aspr1n

8:51 am on Dec 13, 2002 (gmt 0)

10+ Year Member



'onChange' (or onchange as I'll now try) is in a form, and 'onclick' is in
<a href=# onclick= ...>

asp

lorax

2:38 am on Dec 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Here's some interesting reading on the event and event listener elements. These elements are specifically designed for XHTML UI events.


Example 3.1

<img id="b" ...>
<eventlistener id="a" type="(onclick)">
<script>
... some scripting code ...
</script>
</eventlistener>
</img>

In Example 3.1, an eventlistener element is registered with the img element. This eventlistener element will be triggered when an onclick event targets or bubbles through the img element.

[w3.org...]

andreasfriedrich

2:50 am on Dec 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Although I know that a lot of people here say that DTDs are not something you would want to read, they give the authoritative answer to those questions.

[w3.org...]

lorax

2:58 am on Dec 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ya know Andreas,
Ever since we last chatted about DTDs I've been boning up on them and found you're spot on about them. They aren't so bad if you can get past that wall of text. It is intimidating at first.

andreasfriedrich

2:30 pm on Dec 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like to compare the DTD angst to the fact that a lot of law students prefer to read text books instead of court decisions or the actual code. While text books may be easier to read they are far from being authoritative. You might use them in the academic realm, but in the end itīs the written laws and previous court decisions that count.

Glad you got around to using DTDs for what they are worth.

Andreas