65 lines
1.2 KiB
Plaintext
65 lines
1.2 KiB
Plaintext
|
<PUBLIC:COMPONENT lightweight >
|
||
|
<PUBLIC:PROPERTY name=ttText />
|
||
|
<PUBLIC:PROPERTY name=ttWidth />
|
||
|
<PUBLIC:PROPERTY name=ttDelay />
|
||
|
<PUBLIC:METHOD name=ShowPopup />
|
||
|
<PUBLIC:ATTACH event=onfocus onevent="onFocus();" />
|
||
|
<PUBLIC:ATTACH event=onblur onevent="onBlur();" />
|
||
|
<PUBLIC:ATTACH event=onmousemove onevent="onMouseMove();" />
|
||
|
<PUBLIC:ATTACH event=onmouseout onevent="onMouseOut();" />
|
||
|
<PUBLIC:ATTACH event=onclick onevent="onClick();" />
|
||
|
</PUBLIC:COMPONENT lightweight >
|
||
|
|
||
|
<SCRIPT language="JavaScript">
|
||
|
|
||
|
if (!ttDelay) ttDelay = 250;
|
||
|
|
||
|
var _tidDelay = null;
|
||
|
|
||
|
function onFocus()
|
||
|
{
|
||
|
KillDelay();
|
||
|
_tidDelay = window.setTimeout(uniqueID+".ShowPopup();", ttDelay);
|
||
|
}
|
||
|
|
||
|
function onBlur()
|
||
|
{
|
||
|
KillDelay();
|
||
|
top.window.HidePopup();
|
||
|
}
|
||
|
|
||
|
function onMouseMove()
|
||
|
{
|
||
|
if (window.document.hasFocus())
|
||
|
onFocus();
|
||
|
}
|
||
|
|
||
|
function onMouseOut()
|
||
|
{
|
||
|
if (!this.contains(event.toElement))
|
||
|
onBlur();
|
||
|
}
|
||
|
|
||
|
function onClick()
|
||
|
{
|
||
|
ShowPopup();
|
||
|
event.returnValue = false;
|
||
|
}
|
||
|
|
||
|
function ShowPopup()
|
||
|
{
|
||
|
KillDelay();
|
||
|
top.window.ShowPopup(ttText, element, ttWidth);
|
||
|
}
|
||
|
|
||
|
function KillDelay()
|
||
|
{
|
||
|
if (_tidDelay)
|
||
|
{
|
||
|
window.clearInterval(_tidDelay);
|
||
|
_tidDelay = null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
</SCRIPT>
|