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>© 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="javascriptopup('thunbergii01.jpg','no', 269,
165)";><img src="thunbergii01.jpg" border=0 height=50></a>
</td>
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>© 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="javascriptopup('thunbergii01.jpg','no', 269,
165)";><img src="thunbergii01.jpg" border=0 height=50></a>
</td>