GUYYYYYYYYYY
Badges: 0
Rep:
?
#1
Report Thread starter 5 years ago
#1
can someone help me with making select images in my array load from the bottom of the page,
i have searched online and it seems that i have the right code but its just not working.

i'm using dreamweaver if that helps

here is my code;

<!doctype html>
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
</head>


<body>




<script>
<!--//Random Banner image on Page Reload
//store the images in arrays below

images = new Array(10);

images[0] = '<a href="http://www.example.com"><img" width="100%" height="100%" alt=""/></a>';

images[1] = '<a href="http://www.example.com"><img" width="100%" height="100%" alt=""/></a>';

images[2] = '<a href="http://www.example.com"><img" width="100%" height="100%" alt=""/></a>';

images[3] = '<a href="http://www.example.com"><img" width="300%" height="150%" alt=""/></a>';

images[4] = '<a href="http://www.example.com"><img" width="100%" height="100%" alt=""/></a>';

images[5] = '<a href="http://www.example.com"><img" width="300%" height="150%" alt=""/></a>';

images[6] = '<a href="http://www.example.com"><img" width="100%" height="100%" alt=""/></a>';

images[7] = '<a href="http://www.example.com"><img" width="100%" height="100%" alt=""/></a>';


images[8] = '<a href="http://www.example.com"><img" width="100%" height="100%" alt=""/></a>';

images[9] = '<a href="http://www.example.com"><imgg" width="100%" height="100%" alt=""/></a>';


index = Math.floor(Math.random() * images.length);
//console.log(index);
document.write(images[index]);
if(images[index]==5){
window.scrollTo(0,document.body.scrollHeight);}

if(images[index]==7){
window.scrollTo(document.body.scrollWidth,0);}
//done
// -->
</script>
</body>
</html>
0
reply
freddie.erg
Badges: 1
Rep:
?
#2
Report 5 years ago
#2
Can you also upload the style.css file.
0
reply
TheonlyMrsHolmes
Badges: 19
Rep:
?
#3
Report 5 years ago
#3
drowzee this brings back awful memories.

I don't know OP but there is a really good forum you can ask on, but I have forgotten the name. Just search around the net and you will find it, it's well known in the programming world.
0
reply
freddie.erg
Badges: 1
Rep:
?
#4
Report 5 years ago
#4
(Original post by TheonlyMrsHolmes)
drowzee this brings back awful memories.

I don't know OP but there is a really good forum you can ask on, but I have forgotten the name. Just search around the net and you will find it, it's well known in the programming world.
Stack Overflow?
0
reply
TheonlyMrsHolmes
Badges: 19
Rep:
?
#5
Report 5 years ago
#5
(Original post by freddie.erg)
Stack Overflow?
Yeah, that's the one. I used it and it helped.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Do you think receiving Teacher Assessed Grades will impact your future?

I'm worried it will negatively impact me getting into university/college (92)
38.17%
I'm worried that I’m not academically prepared for the next stage in my educational journey (27)
11.2%
I'm worried it will impact my future career (18)
7.47%
I'm worried that my grades will be seen as ‘lesser’ because I didn’t take exams (57)
23.65%
I don’t think that receiving these grades will impact my future (30)
12.45%
I think that receiving these grades will affect me in another way (let us know in the discussion!) (17)
7.05%

Watched Threads

View All