Hi,
I was wondering what's the problem with this code. As long as cursor ir over the text "Move cursor...." the page should display the DIV with message "Sample Text". But with this code it is flickering. Any suggestions ? I'm using IE 5.5
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<div id=div1> </div>
<script language="JavaScript">
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var stl,iex=(document.all),yyy=-1000;
stl=document.all.div1.style
Xoffset= -50;
Yoffset= 20;
function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
stl.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
stl.top=y+yyy;
}
function show() {
var content;
content = "<TABLE BGCOLOR=336699 BORDER=1><TR><TD> Sample Text </TD></TR></TABLE>"
div1.innerHTML = content
stl.display='';
}
function kill() {
stl.display='none';
}
document.onmousemove=get_mouse;
</script>
<a onmouseover="show()" onmouseout="kill()" >Move cursor here to popup message </a>
</BODY>
</HTML>
Thanks
I was wondering what's the problem with this code. As long as cursor ir over the text "Move cursor...." the page should display the DIV with message "Sample Text". But with this code it is flickering. Any suggestions ? I'm using IE 5.5
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<div id=div1> </div>
<script language="JavaScript">
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var stl,iex=(document.all),yyy=-1000;
stl=document.all.div1.style
Xoffset= -50;
Yoffset= 20;
function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
stl.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
stl.top=y+yyy;
}
function show() {
var content;
content = "<TABLE BGCOLOR=336699 BORDER=1><TR><TD> Sample Text </TD></TR></TABLE>"
div1.innerHTML = content
stl.display='';
}
function kill() {
stl.display='none';
}
document.onmousemove=get_mouse;
</script>
<a onmouseover="show()" onmouseout="kill()" >Move cursor here to popup message </a>
</BODY>
</HTML>
Thanks