Click to See Complete Forum and Search --> : Question regarding frames


moclab
05-27-2003, 12:29 AM
Hello,

I am building a page with frames. I have thumbnails of pictures in one of the frames, and when clicked, they open the full size photo in the same frame. What I want to do is, when the thumbnail is clicked and the full size photo is displayed, I also want there to be some text displayed in a different frame, describing the photo. Is there a way to simply output text to a frame when the thumbnail is clicked, or at least display a prepared page with the text into the frame by using HTML.

Thanks
Moclab

khalidali63
05-27-2003, 12:35 AM
Create an array of different messages relative to each image.
In the function where you change the image,pass the apropriate index for the image related message ,
for e.g text messages array is
var msgArr = new Array();

now create a div tag in the page that is being displayed in the frame

<div id="msgDiv"></div>

now you can referrence this div from the function where you change image

parent.frameName.document.getELementById("msgDiv").innerHTML = msgArr[index];

this will print the message in the frame