display image and text

T

Treetop

The following code sets up the list of links. I want to be able to
click on the link with the link title, and display the image and the
image title on the same screen. I am willing to use iframe, frames, or
whatever works the best.



var links=new Array();

links[2]=new Array("picture2.jpg","Pic 2 link title","Pic 2 image
title");
links[1]=new Array("picture1.jpg","Pic 1 link title","Pic 1 image
title");

// and so on ...

for (var i=links.length-1;i>=0;i--)
{
document.write('<a href="' + links[0] + '">' + links[1] +
'</a><br>');
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top