PDA

View Full Version : grant.gb.com


bbb
13th March 2006, 10:45 PM
I've just added a picture randomiser to the home page so that you get one of five different images when you log in. Comments about this or any other part of the site welcome....

www.grant.gb.com

...one weakness I'm aware of is that I have made no consession to 56K users, no excuse for it these days ;)c

Choogster
17th March 2006, 05:03 PM
nicely designed site to surely complement the pictures. a site you really feel you'd like to spend some time on.

Stemmy
17th March 2006, 05:08 PM
I like the idea of the random images.

Can you post the script for me ?

and instuctions on how to implement it please !!

bbb
19th March 2006, 05:37 PM
nicely designed site to surely complement the pictures. a site you really feel you'd like to spend some time on.

Thanks :D

bbb
19th March 2006, 05:39 PM
I like the idea of the random images.

Can you post the script for me ?

and instuctions on how to implement it please !!

This is it Martin...

<script language="JavaScript">
// Advanced Random Images Start
// Copyright 2001-2002 All rights reserved, by Paul Davis - www.kaosweaver.com
var j,d="",l="",m="",p="",q="",z="",KW_ARI= new Array()
KW_ARI[KW_ARI.length]='welcome1.jpg';
KW_ARI[KW_ARI.length]='welcome2.jpg';
KW_ARI[KW_ARI.length]='welcome3.jpg';
KW_ARI[KW_ARI.length]='welcome4.jpg';
KW_ARI[KW_ARI.length]='welcome5.jpg';
j=parseInt(Math.random()*KW_ARI.length);
j=(isNaN(j))?0:j;
document.write("<img src='"+KW_ARI[j]+"'>");

// Advanced Random Images End
</script>

The images are named welcome1.jpg to welcome5.jpg you can add or delete rows to the array to add more pictures or take them away :)

Stemmy
19th March 2006, 09:05 PM
Thanks for that bbb I will use it on my homepage

Stemmy
20th March 2006, 01:51 AM
Nick how do you implement this. You don't just copy and paste the text.

If you go to the website in the script you download a little file.

But how do you get to the screen with the variables for the random images.