View Single Post
  #1 (permalink)  
Old Jul 21st, 2007, 18:58
Zonglars Zonglars is offline
Reputable Member
Join Date: Jul 2007
Location: Windsor, ON, Canada
Age: 19
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Changing innerHTML not really working in IE

(original thread deleted due to... mix-up in communication i guess)

I'm working on some javascript for a gallery on my site, the coding as follows

Code: Select all
function changeImage(fileName,imgName,imgDesc)
{
document.getElementById('full').src="http://i91.photobucket.com/albums/k312/ZumoroNuva/Artwork/" + fileName;
document.getElementById('title').innerHTML=imgName;
document.getElementById('description').innerHTML=imgDesc;
document.getElementById('link').src="http://s91.photobucket.com/albums/k312/ZumoroNuva/Artwork/?action=view&current=" + fileName;
document.getElementById('image').style.display="block";
}
and the HTML

Code: Select all
<div id="image" style="display:none;">
<p><h3 id="title" style="margin:0px;">Image Title</h3>
<span id="description" style="margin:0px;">Image Description</span>
</p>

<div style="text-align:center;margin:0px auto;">
<br/>
<a id="link" href="" onclick="window.open(this.href);return false;"><img id="full" src="" alt="" class="borderBig" style="border-width:6;"></a>
</div>
</div>
the page

it works in FF but IE only does the first 2 lines (changing the src and innerHTML of the title, won't change the description or reveal the div) any ideas what's wrong?
Reply With Quote