When I'm trying to run the following code in IE:-
<html>
<head>
<script language="javascript">
window.onload=function(){
alert("Window.onload is working");
}
</script>
</head>
<body onload="alert('body.onload is working')">
</body>
</html>
It seems that the body.onload overrides window.onload. I want both of them because I have a page and When I press a button, I get a second file and put it inside a div in the first page. So, I need to use window.onload in the first page and when I get the second one, I use body.onload of the second one.
I don't have this problem in FF,Opera,Chrome and Safari.
I hope my problem is clear. Thanks for any help.