Solved

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

Posted on 2004-09-06
2
1,272 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 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now