# Attaching URL's to random images using Javascript?

**URL:** <https://forum.kirupa.com/t/attaching-urls-to-random-images-using-javascript/308493>\
**Category:** web dev\
**Created:** [April 23, 2010, 9:20pm UTC](https://forum.kirupa.com/t/attaching-urls-to-random-images-using-javascript/308493 "2010-04-23T21:20:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boebarl1](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@boebarl1](https://forum.kirupa.com/u/boebarl1)\
**Post date:** [April 23, 2010, 9:20pm UTC](https://forum.kirupa.com/t/attaching-urls-to-random-images-using-javascript/308493/1 "2010-04-23T21:20:11Z")

</div>

I am working on this webpage and I have written the script so that a random image pops up every time you refresh the page.

Now what I am trying to do is connect a url to each image. I want the same url for each image every time. I know I have been trying different things but am not sure if I am going about this the right way. If someone could take a look at this and give me some suggestions I would really appreciate it. You can check it out at

[http://boebarlage.limewebs.com/](http://boebarlage.limewebs.com/)

any feed back will be greatly appreciated.  
Thanks alot!

boebarl1
