Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple onload event mistake/trying to fix 1

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
total newbie. I'm trying to call 2 functions with onload. I realized that I was doing something wrong by having 2 different onload events in 2 different script files. One wouldn't fire.

I have these in 2 files:

window.onload=writeCurrName;
window.onload=startList;

how would you refer to the onload if I got rid of these and instead just had one:

window.onload=loadevent;

function loadevent(){
writeCurrName;
startList;
}

I tried this and it didn't work.
 
You're close, make these changes:
Code:
function loadevent(){
 writeCurrName[!]()[/!];
 startList[!]()[/!];
}

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top