Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Another web qu... about preloading

Old Jul 23, 2002 | 11:25 PM
  #1  
super_si's Avatar
super_si
Thread Starter
Scooby Regular
 
Joined: Feb 2002
Posts: 7,951
Likes: 0
From: Lurkin Somewhere
Post

i want to preload all the pics i use i read it somewhere

can anyone shed any light?

Si
Reply
Old Jul 24, 2002 | 01:29 AM
  #2  
AndiThompson's Avatar
AndiThompson
Scooby Regular
 
Joined: Aug 2001
Posts: 2,474
Likes: 0
From: Republic Of Mancunia
Post

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.
Reply
Old Jul 24, 2002 | 09:32 AM
  #3  
super_si's Avatar
super_si
Thread Starter
Scooby Regular
 
Joined: Feb 2002
Posts: 7,951
Likes: 0
From: Lurkin Somewhere
Post

Thanks mate ill get back to you if i have problems
Reply
Old Jul 24, 2002 | 12:40 PM
  #4  
stevencotton's Avatar
stevencotton
Scooby Regular
 
Joined: Jan 2001
Posts: 2,710
Likes: 1
From: behind twin turbos
Post

Doing that will offer no benefit whatsoever though.

Steve.
Reply
Old Jul 24, 2002 | 01:04 PM
  #5  
super_si's Avatar
super_si
Thread Starter
Scooby Regular
 
Joined: Feb 2002
Posts: 7,951
Likes: 0
From: Lurkin Somewhere
Post

thought the idea was it loaded them all before the site loaded....
Reply
Old Jul 24, 2002 | 04:46 PM
  #6  
stevencotton's Avatar
stevencotton
Scooby Regular
 
Joined: Jan 2001
Posts: 2,710
Likes: 1
From: behind twin turbos
Post

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.
Reply
Old Jul 24, 2002 | 05:25 PM
  #7  
super_si's Avatar
super_si
Thread Starter
Scooby Regular
 
Joined: Feb 2002
Posts: 7,951
Likes: 0
From: Lurkin Somewhere
Post

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]
Reply
Old Jul 25, 2002 | 10:30 AM
  #8  
stevencotton's Avatar
stevencotton
Scooby Regular
 
Joined: Jan 2001
Posts: 2,710
Likes: 1
From: behind twin turbos
Post

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.
Reply
Old Jul 25, 2002 | 11:20 AM
  #9  
AdrianFRST's Avatar
AdrianFRST
Scooby Regular
 
Joined: Oct 2000
Posts: 368
Likes: 0
Post

My sentiments exactly!

Also your logo looks like "Koc Dev E Pt Lopments" and you have a rogue "V" in "Automotive"

Logo might work if you had the same typeface througout.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Rbon91
ScoobyNet General
49
Nov 21, 2018 03:23 PM
Scott@ScoobySpares
Full Cars Breaking For Spares
55
Aug 5, 2018 07:02 AM
south_scoob
ScoobyNet General
22
Oct 3, 2015 01:05 PM
oilman
Trader Announcements
15
Oct 1, 2015 11:55 AM
TimberTronics
Subaru
0
Sep 17, 2015 08:46 PM


Thread Tools
Search this Thread

All times are GMT +1. The time now is 06:50 AM.