944,133 Members | Top Members by Rank

Ad:
Apr 6th, 2007
0

Javascript Function to reload DOM Element?

Expand Post »
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.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. var images = new Array(32);
  2. images[0] = "<img src=\"images/album/1.jpg\" />";
  3. images[1] = "<img src=\"images/album/2.jpg\" />";
  4.  
  5. var i = document.getElementById("curPhtImg");
  6. 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
Similar Threads
Reputation Points: 13
Solved Threads: 2
Junior Poster in Training
Sailor_Jerry is offline Offline
88 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: HELP! need help adding text to slideshow
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: preload a javascirpt file before you can click on a hyperlink





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC