hey guys,

I change the content (bgcolor, HTML) of a DynLayer on a onmouseover event
and change it back on onmouseout (see code below). For some reason the
onmouseout is not triggered when the mouse moves out from the position over the text
"blabla".

What could be the reason for that?

Also maybe is there a better way to switch the content of a layer? I trie it
with 2 layers and setVisible in the the event handlers, but then the whole
area flickered between the two layers while the mouse was inside the area.

thanks for your help,
Matthias

-----------------------------------------------------
layer1=new DynLayer(null,10,100,200,150,'#261D60')

var layer1_HTML = '<div align="right"><font
face="Arial,Helvetica,sans-serif" size="3" 
color="#FFFFFF"><strong>blabla</strong></font></div>'

layer1.setHTML(layer1_HTML)
        
myListener=new EventListener(layer1)

myListener.onmouseover=function(e) {
  target=e.getTarget()
  target.setBgColor('#009163')
  target.setHTML('<div align="right"><font face="Arial,Helvetica,sans-serif"
size="3" color="#CCE9E0"><strong>blabla</strong></font></div><br><br><font
face="Arial,Helvetica,sans-serif" color="#CCE9E0"><a
href="link1.html">link1</a><br>link2<br>link3</font>')
}

myListener.onmouseout=function(e) {
  target=e.getTarget()
  target.setBgColor('#261D60')
  target.setHTML(layer1_HTML)
}

layer1.addEventListener(myListener)
        
DynAPI.document.addChild(layer1)
-------------------------------------------------

-- 
--
Bischofsweg 50, 01099 Dresden, Germany
+49-(0)351-8024153

Sent through GMX FreeMail - http://www.gmx.net


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to