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

Thread Tools
 
Search this Thread
 
Old 23 July 2002, 11:25 PM
  #1  
super_si
Scooby Regular
Thread Starter
 
super_si's Avatar
 
Join Date: Feb 2002
Location: Lurkin Somewhere
Posts: 7,951
Likes: 0
Received 0 Likes on 0 Posts
Post

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

can anyone shed any light?

Si
Old 24 July 2002, 01:29 AM
  #2  
AndiThompson
Scooby Regular
 
AndiThompson's Avatar
 
Join Date: Aug 2001
Location: Republic Of Mancunia
Posts: 2,474
Likes: 0
Received 0 Likes on 0 Posts
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.
Old 24 July 2002, 09:32 AM
  #3  
super_si
Scooby Regular
Thread Starter
 
super_si's Avatar
 
Join Date: Feb 2002
Location: Lurkin Somewhere
Posts: 7,951
Likes: 0
Received 0 Likes on 0 Posts
Post

Thanks mate ill get back to you if i have problems
Old 24 July 2002, 12:40 PM
  #4  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Post

Doing that will offer no benefit whatsoever though.

Steve.
Old 24 July 2002, 01:04 PM
  #5  
super_si
Scooby Regular
Thread Starter
 
super_si's Avatar
 
Join Date: Feb 2002
Location: Lurkin Somewhere
Posts: 7,951
Likes: 0
Received 0 Likes on 0 Posts
Post

thought the idea was it loaded them all before the site loaded....
Old 24 July 2002, 04:46 PM
  #6  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
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.
Old 24 July 2002, 05:25 PM
  #7  
super_si
Scooby Regular
Thread Starter
 
super_si's Avatar
 
Join Date: Feb 2002
Location: Lurkin Somewhere
Posts: 7,951
Likes: 0
Received 0 Likes on 0 Posts
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]
Old 25 July 2002, 10:30 AM
  #8  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
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.
Old 25 July 2002, 11:20 AM
  #9  
AdrianFRST
Scooby Regular
 
AdrianFRST's Avatar
 
Join Date: Oct 2000
Posts: 368
Likes: 0
Received 0 Likes on 0 Posts
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.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Rbon91
ScoobyNet General
49
21 November 2018 03:23 PM
Scott@ScoobySpares
Full Cars Breaking For Spares
55
05 August 2018 07:02 AM
south_scoob
ScoobyNet General
22
03 October 2015 01:05 PM
oilman
Trader Announcements
15
01 October 2015 11:55 AM
TimberTronics
Subaru
0
17 September 2015 08:46 PM



Quick Reply: Another web qu... about preloading



All times are GMT +1. The time now is 04:58 PM.