?
Solved

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

Posted on 2004-09-06
2
Medium Priority
?
1,284 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
2 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

750 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