Click to See Complete Forum and Search --> : [RESOLVED] Need Help with OnLoad Function


leannesdesign
02-04-2010, 02:59 PM
I cannot figure out how to make both of my onLoad functions work within my web page. One is embedded in the Javascript code (within <head>) and the other is placed in the <Body> command. I don't know Javascript at all, so I'll have to link you to the page so that you can view the code. Any assistance is appreciated!
Link (http://www.heartlandcenters.slu.edu/haiti.htm)
Thanks.
~Leanne

ryanbutler
02-05-2010, 02:08 PM
I see no on load calls on your body tag. However, to call multiple functions, just separate them by a semi-colon:

<body onload="myFunction();myFunction2()">

leannesdesign
02-05-2010, 02:54 PM
Thanks for the advice, but I've tried this solution. When I include the on load in the body tag it interferes with my menu because it uses a window.onload in JavaScript. My limited understanding is that you can only use one or the other. My menu uses Slashdot's menu code, and I'm not familiar enough with JavaScript to go in and add the commands. I need the page to onload the menu and images. Any advice?

ryanbutler
02-06-2010, 10:51 AM
Ah, I didn't see that. Trying removing the window.onload call, and just give the function a name like myMenu(), then call that on your opening body tag.

leannesdesign
02-08-2010, 11:38 PM
Thanks so much! It worked perfectly.
~Leanne