ok everything works on this so far except for two things:
– how to make it work when a [B]spacific key– and how to make it so [B]it comes up in the right spot when I scroll
(and doesn’t pop-up off the screen where I can’t see it)
[CODE]
<script language=”Javascript”>
<!–
function toggleDiv(id,flagit) {
if (flagit==”1″)
{
if (document.layers) document.layers[”+id+”].visibility = “show”
else if (document.all) document.all[”+id+”].style.visibility = “visible”
else if (document.getElementById) document.getElementById(”+id+”).style.visibility = “visible”
}
if (flagit==”0″)
{
if (document.layers) document.layers[”+id+”].visibility = “hide”
else if (document.all) document.all[”+id+”].style.visibility = “hidden”
else if (document.getElementById) document.getElementById(”+id+”).style.visibility = “hidden”
}
}
function ViewData(user,ValueShow)
{
if(user.style.visibility==ValueShow)return true
var mousex = window.event.x; // mouse location capture event
var mousey = window.event.y; // mouse location capture event
user.style.visibility = ValueShow; // show or hide respective Example
user.style.left = mousex – 50; // place popup at the mouse X (left) location
user.style.top = mousey; // place popup at the mouse Y (top) location
}
//–>
</script>
<style>
#example1 {
position:absolute;
width:150px;
height:100px;
color:blue;
text-align:center;
visibility:hidden;
z-index:10;
}
</style>
</head>
<body onKeyDown=”ViewData(example1,’visible’)” onKeyUp=”ViewData(example1,’hidden’)”>
<div id=”example1″>
This is the menu
</div>
</body>