Title: Javascript &#8211; random image display with links (help)
Last modified: August 30, 2016

---

# Javascript – random image display with links (help)

 *  [Brian19525](https://wordpress.org/support/users/brian19525/)
 * (@brian19525)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-random-image-display-with-links-help/)
 * Hello. I have two banner images that I want to load randomly and have links. 
   When I add the links into the code nothing shows up. I’m not surprised because
   I have zero coding experience.
 * I have a script that works but I don’t know how to add links to the images. The
   links I need to add are listed below the script. Any help is appreciated.
 * <script language=”JavaScript”>
    function banner() { } ; b = new banner() ; n 
   = 0 b[n++]= “<img name=randimg src=’wp-content/uploads/2015/04/asba_chesmont_728x90.
   jpg’ >” b[n++]= “<img name=randimg src=’wp-content/uploads/2014/09/tampico_leaderboard_728x90.
   jpg’ >” i=Math.floor(Math.random() * n) ; document.write( b[i] ) </script>
 * These are the links to the images:
 * Apparently I can’t post links in this forum

Viewing 1 replies (of 1 total)

 *  Thread Starter [Brian19525](https://wordpress.org/support/users/brian19525/)
 * (@brian19525)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-random-image-display-with-links-help/#post-6566011)

Viewing 1 replies (of 1 total)

The topic ‘Javascript – random image display with links (help)’ is closed to new
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Brian19525](https://wordpress.org/support/users/brian19525/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/javascript-random-image-display-with-links-help/#post-6566011)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
