Web Hosting Talk







View Full Version : How To Validate this...


RobertMaltby
03-09-2006, 11:34 PM
How can I validate the following XHTML Errors:

Below are the results of checking this document for XML well-formedness and validity.

1. Error Line 33 column 13: there is no attribute "onLoad".

<body onLoad="MM_preloadImages('images/index-on.gif','images/support-on.gif','im

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.


2. Error Line 47 column 34: there is no attribute "onMouseOut".

<a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImag


3. Error Line 47 column 68: there is no attribute "onMouseOver".

...ut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/index-


the website iss here: http://x10host.com/testing.html

Thanks Alot :D

Robert

FleZ
03-10-2006, 01:00 AM
For the first one, as explained, the onLoad attribute isn't supported by the document type (doctype) you gave to your page. I think it's the same for onMouseOver & onMouseOut. Try changing your doctype from XHTML to HTML.

You seem to use the Dreamweaver's code for rollovers, but all this could be done with CSS and your document could validate to XHTML.

Jay August
03-10-2006, 01:04 AM
it's really simple. Don't use caps. onload, onmouseover and onmouseout :)

RobertMaltby
03-10-2006, 01:12 AM
Wow, amygdela Your Awesome :D

Thanks So Much for the quick help :D

** Your Awesome to Flex :D

Jay August
03-10-2006, 01:14 AM
no problem mate, glad I could help :) What's the URL to the site if you don't mind me taking a peek?

RobertMaltby
03-10-2006, 01:15 AM
thats it right now... <1 week ago, I was informed my old design was a rip :( so instead of paying another person Im trying to make my own..