forked from ruettet/dddsimplesearch
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple_search.js
More file actions
32 lines (28 loc) · 1 KB
/
simple_search.js
File metadata and controls
32 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// This Script is taken (and slightly modified) from href="http://www.web-toolbox.net/webtoolbox/dhtml/info-box01/info-box01.htm"
var offsetx=20
var offsety=0
function HideInfoBox() {
document.getElementById('InfoBox').style.visibility = "hidden";
}
function ShowInfoBox(e,content,offsetX,offsetY)
{
if (offsetX) {offsetx=offsetX;} else {offsetx=20;}
if (offsetY) {offsety=offsetY;} else {offsety=0;}
var PositionX = 0;
var PositionY = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY)
{
PositionX = e.pageX;
PositionY = e.pageY;
}
else if (e.clientX || e.clientY)
{
PositionX = e.clientX + document.body.scrollLeft;
PositionY = e.clientY + document.body.scrollTop;
}
document.getElementById("BoxContent").innerHTML = content;
document.getElementById('InfoBox').style.left = (PositionX+offsetx)+"px";
document.getElementById('InfoBox').style.top = (PositionY+offsety)+"px";
document.getElementById('InfoBox').style.visibility = "visible";
}