# Gallery JS wont work in IE?

**URL:** <https://forum.kirupa.com/t/gallery-js-wont-work-in-ie/197318>\
**Category:** web dev\
**Created:** [August 15, 2006, 4:18pm UTC](https://forum.kirupa.com/t/gallery-js-wont-work-in-ie/197318 "2006-08-15T16:18:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skepticstudios](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@skepticstudios](https://forum.kirupa.com/u/skepticstudios)\
**Post date:** [August 15, 2006, 4:18pm UTC](https://forum.kirupa.com/t/gallery-js-wont-work-in-ie/197318/1 "2006-08-15T16:18:12Z")

</div>

Im helping out a friend and making a gallery for them with JavaScript, it works fine in every browser - except surprise surprise IE 6

[http://www.bobvideo.co.uk/os/gmj/earth.html](http://www.bobvideo.co.uk/os/gmj/earth.html)

That is a link to the gallery, Im currently viewing in Opera 9 and its working perfectly. This is the script:

```auto

<script type="text/javascript" language="javascript">
function showPic (whichpic) { 
	if (document.getElementById) { 
		document.getElementById('placeholder').src = whichpic.href; 
		if (whichpic.title) { 
			document.getElementById('desc').childNodes[0].nodeValue = whichpic.title; 
		} else { 
			document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue; 
		} 
		return false; 
	} else { 
		return true; 
	} 
}
</script>

```

The placeholder code is:

```auto
<p id="desc"> </p>
<img src="images/gallery/earth/earth1.jpg" alt="" id="placeholder"/>

```

The code for a single thumbnail is:

```auto

<ul>
<li><a onclick="return showPic(this)" href="images/gallery/earth/earth1.jpg" title="Earth 1"> 
<img class="thumb" src="images/gallery/earth/earth1_p.jpg"></a></li>
</ul>

```

When you click on a thumbnail in IE the larger image opens in a new window, why is this happening?
