Click to See Complete Forum and Search --> : load javascript when page loads


mlxsae
December 20th, 2002, 07:04 AM
Dear,

I have an issue regarding javascripts. I have a script which show some dwarrling snow on the screen. I want to show this snow in a framed website. When I define in one of the frame pages the javascript as: <script language="JavaScript1.2" src="snow.js"></script> netscape doesn't load the snow automatically. When I refresh my frame, netscape loads it. With internet explorer this is no problem.

Anyone an idea how to solve this?

Thanks!!
S.:D

timothymo
December 21st, 2002, 03:23 AM
tried onload event in body tag?

mlxsae
December 23rd, 2002, 02:33 AM
Thanks. I've solved it with the following solution. I've created an extra function where I reload the frames again when all others are loaded:

<SCRIPT LANGUAGE="JavaScript">
function refreshFrame() {
frames['Header'].window.location.href = "header.html";
}
</script>
<!-- Usage of a 4 frame window -->
<frameset rows="100,*" border="0" onLoad="refreshFrame();">
<frame name="Header" src="header.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
<frame name="Main" src="html/mask.html" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
</frameset>
<body onload="loadPage()">

Best regards,
S.:D