PDA

View Full Version : Two onLoad functions...


GεεRTHAN
04-09-2007, 03:29 PM
Right I have two functions I want to load upon opening a page...

I have tried one function onLoad and onUnload which works...

<body onload="firstone();" onUnload="secondone()" />

But when I do two functions onLoad and one in onUnload...it doesn't seem to work...

<body onload="firstone();extraone()" onUnload="secondone()" />

Why..? And all functions are working fine...I have tested them independently...

Jon Hanlon
04-09-2007, 07:09 PM
Sounds like a global variable is clashing.
Make sure your variables are local by prefixing them with var inside your functions.
Can't tell anything more without seeing the code.