Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change text dynamically?

Status
Not open for further replies.

hmcheung

Programmer
Oct 13, 2000
66
0
0
HK
Hi,

I have thumbnails in one frame, by clicking on the thumbnail, the photo will appear in another frame. Now I want to display a description for the photo in text (not in a text box or text field) at the same time I click on the thumbnail. How can I accomplish this? for the photo I can control it through

parent.anotherframe.document.images.whateverimage.src=...

but how can I do that to text? Thanks! Please visit my WebCam!!
 
Under the image have a span or a layer and when you click on the thumbnail call a function which changes the HTML of the SPAN or LAYER.

e.g. under the image in the second frame have the following:

<SPAN ID=&quot;mySpan&quot; NAME=&quot;mySpan&quot;>
&nbsp;
</SPAN>

In the onClick for the thimbnail have the following:

onClick=&quot;mySpan.innerHTML='<B>This is the description for the image</B>'&quot;

You might have to change the onClick to suit frames but I hope you get the idea. Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top