Forum Moderators: open
function changeImage(){var img = parent.frames[0].document.getElementById("Image2");
img.setAttribute("src","www.MyWebSite.com/Images/0001.gif")}
The problem I am having NOW, is that I have another link on the bottom table, that must first retrieve a value from the top table which creates part of the href for the image, which then changes the image again in the top table. The code I am trying to work with is:
function changeImage1(){var na = parent.frames[0].document.getElementById("Field1").value;
document.getElementsByTagName('a')[0].href='www.MyWebSite.com/Images/'+na;}
OK... This code will retrieve the value fine and creates the new href too! But it loads the new image in the bottom table and not back in the top table! I’m pretty sure all I need to do is add: parent.frames[0] to the bottom line of the code to send the image back to the top, but I have been playing around with this, with no luck! Could someone PLEASE Help me...........
Also as a secondary problem which may arise later. Apart from just sending it back to the top table, Is it possible to replace the old image (in my “Image2”) with the new Image created with the value?