my spiel
<HTML>
<HEAD>
<TITLE>Popup Glossary Definition Sample</TITLE>
<SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function fnDef()
{
if (event.srcElement.id == "brasshat")
oPopup.document.body.innerHTML = oBrassHat.innerHTML;
else if (event.srcElement.id == "entrechat")
oPopup.document.body.innerHTML = oEntrechat.innerHTML;
var popupBody = oPopup.document.body;
// The following popup object is used only to detect what height the
// displayed popup object should be using the scrollHeight property.
// This is important because the size of the popup object varies
// depending on the length of the definition text. This first
// popup object is not seen by the user.
oPopup.show(0, 0, 300, 0);
var realHeight = popupBody.scrollHeight;
// Hides the dimension detector popup object.
oPopup.hide();
// Shows the actual popup object with correct height.
oPopup.show(0, 15, 300, realHeight, event.srcElement);
}
</SCRIPT>
</HEAD>
<BODY>
The <SPAN ID="brasshat" onclick="fnDef();">brass hat</SPAN>
was impressed by the grace of the dancer's
<SPAN ID="entrechat" onclick="fnDef();">entrechat</SPAN>.
<!-- Nested DIVS inside this hidden DIV store the code that populates the
popup object. -->
<DIV STYLE="display:none;">
<DIV ID="oBrassHat">
<DIV>
<B>brass hat:</B><BR>
A high-ranking official.
</DIV>
</DIV>
<DIV ID="oEntrechat">
<DIV>
<B>entrechat:</B><BR>
A jump in ballet during which the dancer crosses the legs a
number of times, alternatively back and forth.
</DIV>
</DIV>
</DIV>
</BODY>
</HTML>