• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

HTMl W3C Fehlermeldung? Onmouseover

Bahula

Neues Mitglied
Hallo Leute,

folgendes Menü erzeugt nachstehenden Fehler beim W3C Check.
Habt ihr eine Ahnung wo da das Problem ist?


Code:
<td valign="top" >
<div class="bereich" onmouseover="anzeigen('menue1'); MM_swapImage('button1','','images/button/button1b.png',1)" onmouseout="anzeigen('menue1');MM_swapImgRestore()">
<img src="images/button/button1.png" alt="Social Media" name="button1" width="140" height="25" align="middle" />


<span class="menueklein" id="menue1" style="display: none;">
<a href="" class="link">Zielgruppe</a>
<a href="" class="link">Möglichkeiten</a>
<a href="" class="link">Vorteile</a>
<a href="" class="link">Warum Wir</a>
</span>
</div>
</td>
Fehlermeldung:


  1. error.png
    Line 156, Column 34: there is no attribute "onMouseover" <div class="bereich" onMouseover="anzeigen('menue2'); MM_swapImage('button2',''…
    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
  2. error.png
    Line 156, Column 125: there is no attribute "onMouseout" …s/button/button2b.png',1)" onMouseout="anzeigen('menue2');MM_swapImgRestore()"…
    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Kann mir jemand sagen wie ich den weg bekomme oder wo das Problem ist?
 
Was ist denn nun richtig, so wie es in der Fehlermeldung steht (onMouseover) oder so wie du es in deinem Code hast (onmouseover). Nach der Fehlermeldung würde ich sagen du hast es mit einem großen M geschrieben, die DTD erwartet aber ein kleines m.
 
Du hast natürlich absolut recht. Bin leider über die kleinschreibung gestolpert. Man wird beim coden ja schnell mal blind für so Sachen.

Besten Dank.
 
Moin,

die erste Fehlermeldung bezieht sich wohl eher auf den nicht beendeten (nicht zu verwechseln mit geschlossenem) div-tag (siehe: Zitat).

Nein, weil der gesamte div tag etwas länger ist.

<div class="bereich" onmouseover="anzeigen('menue1'); MM_swapImage('button1','','images/button/button1b.png',1)" onmouseout="anzeigen('menue1');MM_swapImgRestore()">
 
Zurück
Oben