if there is a on_load attribute on the body tag then the events added by the addLoadEvent() will not be run.

try adding aler_t('on_load') to the body and it will cause the failure.
darn malicious data catcher, making this post so hard to enter.

CommentFileSizeAuthor
#5 remove_onload_doc.patch1003 bytesgordon
#3 remove_onload.patch4.39 KBgordon

Comments

killes@www.drop.org’s picture

Gordon, is that still an issue?

gordon’s picture

Yes as far as I know, it is still an issue. This is more to do with the browsers not running the window.onload when there is a on_load in the page.

One option is that we obsolete the on_load and force all modules to use the new js function.

 

gordon’s picture

StatusFileSize
new4.39 KB

Removed theme('onload_attributes') as this causes the new js stuff to die.

If you need to run some js on_load then use the new js addLoadEvent() to start a function.

gordon’s picture

Assigned: Unassigned » gordon
Status: Active » Needs review
gordon’s picture

StatusFileSize
new1003 bytes

here is a patch to remove the on_load hook from the documentation

darius’s picture

Seems that removing hook_onload is the right thing to do at this stage. There was a duplicate issue http://drupal.org/node/31755 which I just closed that discussed the same problem.

Darius

chx’s picture

Status: Needs review » Reviewed & tested by the community
dries’s picture

Project: Drupal core » Documentation
Component: other » Developer Guide

Committed this to HEAD. Moving this to the documentation project as the documentation patch still needs committing. I'd also add a note to the upgrade guide.

bryan kennedy’s picture

I added this issue to the module upgrade handbook page

sepeck’s picture

Status: Reviewed & tested by the community » Closed (fixed)

as it's added to the docs, closing