onLoad twice

I have 2 onLoads in the body, but only the first one will work.
How can I make both work?

here's what i got:<BODY BGCOLOR="#OOOOOO" TEXT="#ffffff" LINK="#00ff40" VLINK="#C0C0C0" onLoad="makesnake()" style="width:100%;overflow-x:hidden;overflow-y:scroll" onLoad="pagestart();"
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What about something like:

var makesnake
var pagestart

function doIt(){

<body onLoad="doIt()"
Why don't you do this:

<script language="javascript">
funcion init(){
  makesnake ()
  pagestart ()

<body .... onload="init()">


Why so difficult?

Q98 >

Just use both functions in the onLoad event handler :

<body ...onLoad="makesnake();pagestart();">


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Oubelkas yes, you are right, but I ususally try to do it in a function for easy reading, modifing, etc.

Q98Author Commented:
all this goes togather;
 onLoad="makesnake()" style="width:100%;overflow-x:hidden;overflow-y:scroll"

and all this goes togather; onLoad="pagestart();"

I have tried putting them togather with only one "onLoad=", which ever one I put first works, the second does not work.
what is that you want?

just do as I commented,

You had :

<BODY BGCOLOR="#OOOOOO" TEXT="#ffffff" LINK="#00ff40" VLINK="#C0C0C0" onLoad="makesnake()" style="width:100%;overflow-x:hidden;overflow-y:scroll" onLoad="pagestart();"

change this too :

<BODY BGCOLOR="#OOOOOO" TEXT="#ffffff" LINK="#00ff40" VLINK="#C0C0C0" onLoad="makesnake();pagestart();" style="width:100%;overflow-x:hidden;overflow-y:scroll" onUnload="if(brOK){stopme('joshhead');">  

Not trying to sound rude, by the way ;) I read the comment and it is like I'm some kinda bad teacher or so, sorry! :)
Q98Author Commented:
Here is the same page with both working;
Q98Author Commented:
That's OK, that works, I wasn't sure how to add the rest of the code,
Thanks for posting the whole body tag.
So what's the problem? If they are both working?
What you should do for this I guess, is put the javascript functions in your test.html (thus your frameset) and then in the onLoad of the frameset call the two functions :

<FRAMESET COLS="50%,*" BORDER="3" FRAMEBORDER="3" FRAMESPACING="3" onLoad="makesnake();pagestart();" onUnload="if(brOK){stopme('joshhead');">

See if this is what you want then....

Oh, cross-posted, didn't know you already accepted answer. Thanks! Forget the last comment please. ;)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.