BlankWhat you're looking for is:
document.all.elementname.innerHTML = "The text you want to write";
Where elementname = the id of the element: <td id="elementname"</td>
and "The text you want to write" = the text you want to appear. It can be a variable.
If you want to define a special font or font color it's done as shown below.
document.all.elementname.innerHTML = "<font color=blue>The text you want to write</font>";
hth
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
"Trevor L." <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
Hello to all the wonderful experts out there.
This may not be strictly a FrontPage question, it is more an HTML/Javascript question,
but I don't know whether there is a more specialised Newsgroup for this type of query.
I have a table like this (there are many more entries)
<table>
<tr>
<td>
<a href="#1"
onclick="... (action) ...">
<img src="images/blank.gif" name="Thumbs1" alt=""><br>
Collage<br>
(mainly<br>
Kate's<br>
Family)
</a>
</td>
........
</tr>
</table>
I have written Javascript to alter the image displayed as follows
function PreLoadThumbs()
{ var ThumbnailsImg = new Array() ;
for (i = 0; i < Thumbnails.length; i++)
{ ThumbnailsImg[i] = new Image() ;
ThumbnailsImg[i].src = Thumbnails[i] ;
document.images["Thumbs" + (i + 1)].src = ThumbnailsImg[i].src; }
(where Thumbnails is a global text array of the thumbnail names
e.g.var Thumbnails = new Array("images/thumbnails/family-pictures.jpg" ,
... ) ;
I would like to be able to do exactly the same for the captions as for the images,
so I have set up an array of caption names
e.g var Captions = new Array("Collage<br>(mainly<br>Kate's<br>Family)" ,
...);
I can put the following code in place of the actual caption and it works
<script type="text/javascript">document.write(Captions[0])</script>
However, I would prefer to do it the same way as the images
i.e. refer to the HTML element and then assign the corresponding element of array Captions to that
HTML
something like
document.text["Caption" + (i + 1)] = Captions[i]; }
How do I refer to this element of the HTML?
I am sure I need something other than document.text :-)
--
Thanks,
Trevor L.
I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html