Another web qu... about preloading
#2
Scooby Regular
Join Date: Aug 2001
Location: Republic Of Mancunia
Posts: 2,474
Likes: 0
Received 0 Likes
on
0 Posts
stick this between your <head> tags
<script language="Javascript1.1">
var arImages=new Array();
function Preload() {
var temp = Preload.arguments;
for(x=0; x < temp.length; x++) {
arImages[x]=new Image();
arImages[x].src=Preload.arguments[x];
}
}
</script>
then, change your body tag to this:
<body onload="Preload('image1.gif','image2.gif')">
obviously, change the image names. should work.
<script language="Javascript1.1">
var arImages=new Array();
function Preload() {
var temp = Preload.arguments;
for(x=0; x < temp.length; x++) {
arImages[x]=new Image();
arImages[x].src=Preload.arguments[x];
}
}
</script>
then, change your body tag to this:
<body onload="Preload('image1.gif','image2.gif')">
obviously, change the image names. should work.
#6
Scooby Regular
Use height and width tags (as everyone should anyway) so the browser knows how much space to allocate for images instead. Javascript might even be turned off on the browser rendering it useless. I know it's turned off in mine
Steve.
Steve.
#7
Scooby Regular
Thread Starter
Join Date: Feb 2002
Location: Lurkin Somewhere
Posts: 7,951
Likes: 0
Received 0 Likes
on
0 Posts
could you write me a small example mate java script it forein to me!
http://www.iantrott.co.uk/test/
Got a java script menu working, ignore pages not done anything yet!
Si
[Edited by super_si - 7/24/2002 5:26:01 PM]
http://www.iantrott.co.uk/test/
Got a java script menu working, ignore pages not done anything yet!
Si
[Edited by super_si - 7/24/2002 5:26:01 PM]
Trending Topics
#8
Scooby Regular
Do yourself a massive favour. Learn HTML, I mean proper W3C (www.w3c.org) valid HTML, then learn the CSS 1 and 2 specifications. You'll be FAR better off knowing that properly than messing around with little toys like javascript.
Steve.
Steve.
Thread
Thread Starter
Forum
Replies
Last Post
Scott@ScoobySpares
Full Cars Breaking For Spares
55
05 August 2018 07:02 AM
oilman
Trader Announcements
15
01 October 2015 11:55 AM