XHTML onload validation issue

I’m trying to validate the following URL, please see:

http://www.tenthtime.co.uk/

I’m down to one final issue, a javascript onload which is resulting in the error “there is no attribute ‘onload’”.

[Invalid] Markup Validation of http://www.tenthtime.co.uk/ - W3C Markup Validator

I originally assumed this was due to the fact that OnLoad was capitalized, however changing this has no affect.

Advice appreciated.

Thanks! :slight_smile:

Try taking the inline onload out of the mark-up and using an event handler. Much cleaner.

onload will validate in an xhtml doctype but but onLoad will not. It needs to be lowercase and should have resolved the problem but as Alan said above an event handler is a better way to handle things.:slight_smile:

While “onload” will validate it is still better to NOT jumble JavaScript with (X)HTML and to instead keep them in separate files with only the <script> tag to link them together…