Solved

onload attribute not valid xhtml strict? what can i replace this with?

Posted on 2004-09-06
2
1,280 Views
Last Modified: 2013-11-19
I am trying to make my code xhtml strict compliant - however, i receive an error message that:

"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. "

Can anyone explain to me how I can solve this? Should i change my doc type to transitional? Or is there another way I can change the code to keep this doc type?

my code is:

<td width="328" height="19" align="center" valign="middle"><img src="images/Karnak_jpg.jpg" name="karnak" width="300" height="300" id="karnak" alt="karnak temple" onload="P7_Snap('karnak','Layer1',-7,303)" /></td>
            </tr>

i'm using dreamweaver, with an extension i downloaded from projectseven.com called "snap layers"

does anyone have a suggestion?
0
Comment
Question by:MMsabry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 500 total points
ID: 11993172
Hi

I do not believe onload is acceptable for a image. Try moving the onload to the body tag since you don't seem to need it there, for instance:

<body onload="P7_Snap('karnak','Layer1',-7,303);">

Regards,
Zyloch
0
 

Author Comment

by:MMsabry
ID: 11993286
thanks, that did it!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn how to dynamically set the form action using jQuery.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question