Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XHTML validation of event handlers 1

Status
Not open for further replies.

Epimetheus

Technical User
Oct 9, 2001
10
0
0
GB
Not sure if this is the right forum for this, but here goes...

I'm trying to get to grips with XHTML, but I'm having trouble with one aspect of getting it to validate correctly. The problem is with event handlers. I'm wanting to call a javascript funtion from the <body> tag using the onLoad event i.e. <body onLoad=&quot;....()&quot;>, but XHTML treats the inclusion of the onLoad in the <body> tag as an attribute of the <body> tag and states that, as an attribute, onLoad does not exist as a valid on!

Does anyone have any ideas how to get around this, as I asume it will result in the same error for any event handler used.
 
either change the dtd to accept events as attribute (coz that's what they are, actually)
or don't check against the dtd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top