Welcome to WebmasterWorld Guest from 54.146.239.96

Forum Moderators: httpwebwitch

Message Too Old, No Replies

XHTML Doctype Error Troubleshoot

     

Webmac50

1:22 pm on Oct 4, 2004 (gmt 0)

10+ Year Member



I'm relatively new to webmastering and have one little error message that prevents my code from validating. I used DWMX's default navigation bar with rollovers and it inserts all it's own code. When I try to validate my code with the DTD XHTML 1.0 Transitional//EN, I keep getting this error message: "...there is no attribulte "onload"
...ght="20" border="0" id="home" onload=""

I've checked for the spelling and no errors there. I don't want to change my doctype if possible and this is the only error that comes up? Can anyone enlighten me?

Thanks,
Webmac50

bateman_ap

1:28 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just a thought but is it all in lowercase? XHTML has to have all its tags in lower so onLoad will fail, onload will work.

Webmac50

1:32 pm on Oct 4, 2004 (gmt 0)

10+ Year Member



Yes, all lowercase.

encyclo

1:44 pm on Oct 4, 2004 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Also, what is the complete tag that the onload event is on?

I'm guessing it's an img tag, and onload can only be used on the

body
or
frameset
elements according to the specifications [w3.org]. However, most browsers allow onload to be added to objects and images too.

irnbru

1:47 pm on Oct 4, 2004 (gmt 0)

10+ Year Member



Is your onload attribute in a body tag?

Webmac50

3:18 pm on Oct 4, 2004 (gmt 0)

10+ Year Member



Through trial & error, I eliminated the -onload=""- and now the code validates. Thanks for the assist.