Hi
i am generating a div in my window which moves with my cursor on the screen.
this works fine until i try to move the cursor over an iframe in the window.
if i use the z-index the div moves in front of the iframe, but the moment the cursor is inside the iframe the div stops.
i use the following code as javascript:
"
<script type="text/javascript">
function cursorPos()
{
var Arr = new Array()
<%set getnames=myconn.execute("select * from names order by name asc")
iCnt=0
while not getnames.eof%>
Arr[<%=iCnt%>]= '<table><tr><td align=center><span style="font-variant: small-caps; text-decoration: blink; letter-spacing: 2px"><b><%=getnames("name")%></b></span></td></tr><tr><td align=center><font size=1 face=verdana><%=getnames("city")%>, <%=getnames("country")%></font></td></tr><tr><td><font size=1 face=verdana>[scroll over the screen to see who respects you more]</font></td></tr>';
<%iCnt=iCnt+1
getnames.movenext
wend
getnames.close%>
var xpos = event.clientX+1
var ypos = event.clientY+1
name = (ypos/xpos)
if (name > 1)
{
name=1/name
}
name = Math.round(2000*name)
document.getElementById('zzz').style.left=event.cl ientX
document.getElementById('zzz').style.top=event.cli entY
document.getElementById('zzz').innerHTML='<font face=verdana size=1 color=000000>'+Arr[name]+'</font>'
}
</script>"
where Arr[name] contains the content of the div.
the div looks like:
"<div id="zzz" style="padding: 5px; position: absolute; left: 1; top: 1; background-color: #FFFF00; z-index: 100;" ></div>"
and the event is triggered by:
"<body onmousemove="cursorPos()" bgcolor="<%=bodyback%>" topmargin=10 leftmargin=10 align=center>"
the iframe looks like:
"<IFRAME SRC="sitecontent.asp" STYLE="position:absolute; z-index:0;"> name="content" frameborder="0" width="100%" height="100%" scrolling="auto"></iframe>"
it looks like the event is not fired within the iframe.
i have tried to fire it inside the iframe but that does not work either.
what can i do?
thanks for your help!
lefrison