View Full Version : big scripts "preloaded" when entered the site
Hi all,
i fetch a lot of data into js layers for a menu.
this is my question :
my index.php has become pretty big now and i wondered how i could manage to somehow load just some of the content when a user enters a site while the rest of it is loaded in the beckground.
can anybody help me out?
does anyone know some links for js -tutz?
thx
greetings
kaot
;)
beetle
10-31-2002, 03:54 PM
Well, the typical way to handle that with javascript is to place any type of loading stuff to run with the BODY's onLoad event...
common example..
<body onLoad="preloadImages();">
So, after the entire page has loaded, the script continues to preload images for whatever purpose...
Thank you for answering, beetle!:)
---->Well, the typical way to handle that with javascript is to place any type of loading stuff to run with the BODY's onLoad event...
common example..
<body onLoad="preloadImages();"> <-------
that ihave seen in some examples...
so far so good,
but is there a possibility to preload anything but images?:confused:
greetz
kaot
Vladdy
11-01-2002, 12:46 PM
<body onLoad="preloadImages();">
... would not it be postloadImages(); ........ ;) ;) ;)
I would try this:
<script>
function loadMore()
{ myscript=document.createElement('script');
scripts.src="moreStuff.js";
document.getElementsByTagName('head')[0].appendChild(script);
}
</script>
</head>
<body onload="javascript: loadMore()">
where morestuff.js loads teh rest of the page
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.