954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Javascript Function to reload DOM Element?

Is there a javascript function that will reload a dom element if given the element id?

I am using javascript to update a divs innerHTML with the location of an image.

Cut of the javascript code below.

var images = new Array(32);
images[0] = "<img src=\"images/album/1.jpg\" />";
images[1] = "<img src=\"images/album/2.jpg\" />";

var i = document.getElementById("curPhtImg");		
i.innerHTML = images[curImgNum];


This works in firefox, but in ie the window does not repaint with the updated image.
Also if anyone has any other ideas on how i could do this please let me know.

Thanks, sj

Sailor_Jerry
Junior Poster in Training
88 posts since Aug 2005
Reputation Points: 13
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You