View Full Version : using 2 onload event in the body tag?
01-26-2006, 08:47 PM
Want to know is is possible to have 2 diff. onload events in the same page? I have 2 different scripts for 2 diff. things. They both use onload event.....if so, how can we handle it. Thanks.
01-26-2006, 09:12 PM
It is for images, but once you use the onload event in the body tag it overrides the image tag onload events. I think//
01-26-2006, 09:18 PM
Given there are no other conflicts between the scripts, you simply write them together. If the originals said onload="xxxxx" and onload="yyyyy" respectively, then you can write them together as onload="xxxxx;yyyyy". A better approach would perhaps be to do it in script though.
01-26-2006, 09:37 PM
I usually just make a new function and have that call my two other functions.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.