Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

64 lines
1.2 KiB

<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>