Random images

Sorry, i posted this in the “server/scripting” section, but no-one is browsing it and i want an answer fairly soon (im an impatient bugga aint I?) can you guys help?

im gonna be honest - I know virtually nothing about scripting etc and im finding hard to learn also.

I was wondering if anyone knew where i can get a script from to randomly load images into my page from a set directory. I want the images to load into a specific tablecell.

Any help (any at all) would be greatly appreciated.

Thanks in advance :slight_smile:

:link:[COLOR=orange]the orange one[/COLOR] :link:

What language? JavaScript?

any that work! I imagine javascript would be the easiest. Im sorry, im useless when it comes to HTML/JAVA etc. :blush:

OK, here’s a script of mine that works…


function random_imglink(){
var myimages=new Array()
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
</script>
 

Just put that in the cell you want the image to appear in. You can put as many images into the array as you like. :slight_smile:

thanks, thats amazing! (im easily impressed by scripting) You are a wealth of knowledge! Why can’t i meet girls like you where i live? (most girls in my area are of the “single-mum-at-14” type)

What can I say, I’m a geek. :slight_smile: Been programming computers since I was 14. :stuck_out_tongue:

people always say that “one day women will inherit the earth”

People have also said that “geeks shall inherit the earth”.

I guess that makes you one of the number one contenders for world dictator =)

Result. :beam:

It’s quite sad really, I was the only girl in my school to take the Computer Science GCSEs and A Level. And there were only three of us in my University course on Programming. :sigh:

kinda makes you feel special though?

Its good you stuck with it. I had a girl in my engineering class (now one of my best friends), but she couldn’t hack it cos she was surrounded by lads all day.

We need more women in engineering dammit! (and programming/webdesign hee hee!)

I kinda liked being surrounded by all those lads. :stuck_out_tongue: In fact most of the guys from my A Level course are still my best mates now. We all play football and that together. :slight_smile:

They guys themselves were all cool with having a girlie in their class, it was the teachers that thought I was weird. :stuck_out_tongue:

teachers hate non-conformists. Its one of the laws of the universe.
hmm… football - knowlege of the offside rule and the 4-4-2 formation AND you know about computers. You’re a lad in disguise ain’t ya?:stuck_out_tongue:

Lemme check… :stuck_out_tongue:

Nope, I’m a girl. I just like and do bloke-y things. :slight_smile:

he heh! thats cool. Im surprised you need to check though.

well i dunno if its wierd or not, but i started javascripting at the age of 10 and im still only 12 :stuck_out_tongue:

graphicslash, your footer is a bit large, isnt it;)

O.o, yeah, i never knew there were footer guidelines… hehe, ill change it soon