MrCraig
10-04-2008, 01:45 PM
Havent seen one posted, but whats the function to carry out an action after a certain time.
Whats happening in my case is im using a function that loads the entire website, that same function loads the pages inside the website, but it seems to be loading the things inside the page before the actual page has finished loading.. :|
Any help anyone.?
Code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HabboRave</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style typ="text/css">
body{font-family:verdana; font-size:11px; color:#000000; background-image:url(bg/hab_grey.png); background-attachment:fixed;}
#adverts{background-image:url(img/adverts_rollover.gif); background-position:top;}
#adverts:hover {background-image:url(img/adverts_rollover.gif); background-position:bottom; cursor:pointer;}
#adverts_selected{background-image:url(img/adverts_white.gif);}
#dj{background-image:url(img/dj_rollover.gif); background-position:top;}
#dj:hover{background-image:url(img/dj_rollover.gif); background-position:bottom; cursor:pointer;}
#dj_selected{background-image:url(img/dj_white.gif);}
.hr_stats{background-image:url(img/habborave_r3_c15.gif); padding:0px; font-family:verdana; font-size:11px; font-color:#FFFFFF;}
</style>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js"></script>
<script type="text/javascript">
function cpage(page)
{
document.getElementById("hr_content").innerHTML = '<img src="img/load_big.gif" border="0" /><br />Loading...';
new Ajax.Updater('hr_content',page);
}
function stats()
{
document.getElementById("hr_stats").innerHTML = '<img src="img/load_small.gif" border="0" />';
new Ajax.Updater('hr_stats','page/stats.php');
}
function initpage()
{
document.getElementById("main_div").innerHTML = '<img src="img/load_big.gif" border="0" /><br />Please wait whilst HabboRave Loads...';
new Ajax.Updater('main_div','habborave.htm');
stats();
setInterval("stats()",40000);
}
</script>
</head>
<body onload="initpage();">
<div id="main_div" align="center">
</div>
</body>
</html>
Whats happening in my case is im using a function that loads the entire website, that same function loads the pages inside the website, but it seems to be loading the things inside the page before the actual page has finished loading.. :|
Any help anyone.?
Code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HabboRave</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style typ="text/css">
body{font-family:verdana; font-size:11px; color:#000000; background-image:url(bg/hab_grey.png); background-attachment:fixed;}
#adverts{background-image:url(img/adverts_rollover.gif); background-position:top;}
#adverts:hover {background-image:url(img/adverts_rollover.gif); background-position:bottom; cursor:pointer;}
#adverts_selected{background-image:url(img/adverts_white.gif);}
#dj{background-image:url(img/dj_rollover.gif); background-position:top;}
#dj:hover{background-image:url(img/dj_rollover.gif); background-position:bottom; cursor:pointer;}
#dj_selected{background-image:url(img/dj_white.gif);}
.hr_stats{background-image:url(img/habborave_r3_c15.gif); padding:0px; font-family:verdana; font-size:11px; font-color:#FFFFFF;}
</style>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js"></script>
<script type="text/javascript">
function cpage(page)
{
document.getElementById("hr_content").innerHTML = '<img src="img/load_big.gif" border="0" /><br />Loading...';
new Ajax.Updater('hr_content',page);
}
function stats()
{
document.getElementById("hr_stats").innerHTML = '<img src="img/load_small.gif" border="0" />';
new Ajax.Updater('hr_stats','page/stats.php');
}
function initpage()
{
document.getElementById("main_div").innerHTML = '<img src="img/load_big.gif" border="0" /><br />Please wait whilst HabboRave Loads...';
new Ajax.Updater('main_div','habborave.htm');
stats();
setInterval("stats()",40000);
}
</script>
</head>
<body onload="initpage();">
<div id="main_div" align="center">
</div>
</body>
</html>