Re: Error message - there is no attribute "onload"

2013-04-25 11:54, Susan Pidcock wrote:

> I get the following Error message when validating by document
>
>  1. Error /Line 239, Column 235/: there is no attribute "onload"

That's because it appears in an <img> element and the document declares 
XHTML 1.0 Transitional, in which the onload attribute is allowed in the 
<body> element only.

Attributes like onload are generally old-fashioned, and many people 
favor doing JavaScript things in external JavaScript files, instead of 
throwing in pieces of JavaScript code into HTML attributes. But changing 
an existing site to do so would be a major effort. In this case, just 
ignore the error message, if you are confident enough that the attribute 
is supported by relevant browsers for <img> elements.

> Please find attached a zipped version of the  document concerned.

In future, please post a URL in a problem report, instead of sending a 
page as an attachment.

Yucca

Received on Saturday, 27 April 2013 20:36:17 UTC