• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

onload two different events

asuh

Golden Member
I currently am trying to use two onload script events to load rollover images as well as a CSS based menu. When I have one onload, the other event doesn't work. So it's one or the other.

To be specific, I have a window.onload=startList; from a .js file and the other script is onload="preloadImages()" in the Body tag. From my research, one or the other must be deleted. Is there a way to make both of these work?
 
Okay, what you wrote sounds good. Now I need to know how to combine the two different function scripts. I'm not familiar with the proper syntax to write both of these codes so that I can combine all of the functions, but do I just include your code at the end of a bunch of strings of functions?
 
Originally posted by: asuh
Okay, what you wrote sounds good. Now I need to know how to combine the two different function scripts. I'm not familiar with the proper syntax to write both of these codes so that I can combine all of the functions, but do I just include your code at the end of a bunch of strings of functions?

could you clarify that? just include that function like any other...
 
So you mean, just as they are, cut and paste them into one js file?

And to reference the syntax question, here's where I got that code.
 
Originally posted by: asuh
So you mean, just as they are, cut and paste them into one js file?

And to reference the syntax question, here's where I got that code.

Yes that should work.

Well if it works the syntax is right I guess.
 
Back
Top