Popup window with text in it

J

James Stewart

I want to have two links on a page, one a thumbnail picture and one an icon
to a plant description. I have a script that allows me to click on the
thumbnail and open a popup window with the full screen image. Now I want to
use that same script to be able to click on the icon and have a plant
description appear in the window. The catch is, I don't want the description
to be from a seperate page, i.e. I want the description to be part of the
href tag. Let me know if my question needs clarification.

What I have so far is...

In the head...

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

function Popup(URL, SCROLL, WIDTH, HEIGHT) {
var winl= (screen.width - WIDTH) / 2;

winprops =
"left="+winl+",top=1,scrollbars="+SCROLL+",width="+(WIDTH+20)+",height="+(HEIGHT+10);

text = "<html><head><title>&copy; Woodland Gardens
Landscaping</title></head><body bgcolor=#E2ECE4";

text += "><center><img src='" + URL + "'>";

text += "</center></body></html>";

preview = window.open("", "preview", winprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}
// End -->
</script>


In the body...

<td width=290><img src="thunbergiiCrimson01.jpg"></td>
<td width=220 valign=top><i>Berberis thunbergii</i><br>Japanese barberry<p>
<div align=center><a href="javascript:popup('thunbergii01.jpg','no', 269,
165)";><img src="thunbergii01.jpg" border=0 height=50></a>
</td>
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top