Multiple OnLoad java scripts
Is it possible to have more than one Onload spripts in an html page? If so what is the correct way of doing this. I want to be able to run to animations, one after the other.
Thanks
Web Development
Is it possible to have more than one Onload spripts in an html page? If so what is the correct way of doing this. I want to be able to run to animations, one after the other.
Thanks
by jay eckles
There should only be one onLoad event handler in a page. However, there's no reason you can't call multiple functions from that one onLoad event. Perhaps a better idea is to create an onLoad event handler function...then in the onLoad event, you call your handler function, and that function calls others, and if needed, coordinates and times the calls to other functions.
or
function loadpage(){
function1() ;
function2() ;
return true ;
}
If you're mixing VBScript and Javascript (for instance in an all-IE corporate intranet), then you can call VBScript functions from Javascript, so the above solution will work.
Good luck.
Jay Eckles
www.jayeckles.com
by ecampos
by ecampos
This discussion is closed to new replies.
Sort by Trending