Thanks, I now have a work-around, but it still seems rather odd. I think the
problem stems from trying to set up a layer-deletion event handler in
DynAPI.onload. I get around it by making the setup another function, and
then having a separate script-tag section with only
DynAPI.onLoad, calling the function.
> It would be interesting to know what you are actually "fiddling
> around", e.g. a code snippet could help understanding that issue.
Here's a distilled version of the problem page. Sorry it's a bit more than a
"snippet"; I wouldn't know what to send & what not to.
<html> <head> <title>onmouseover/onmouseout problem</title>
<script language="javascript" src="../src/dynapi.js"></script>
<script language="javascript">
<!--
DynAPI.setLibraryPath("../src/lib/");
DynAPI.include("dynapi.api.*");
DynAPI.include("dynapi.event.*");
function MakeLayer() {
var newLayer = new DynLayer(null,200,110,100,50,"#c0c0c0");
DynAPI.document.addChild(newLayer);
}
function RemoveLayer() {
var index = DynAPI.document.children.length - 1;
DynAPI.document.children[index].deleteFromParent();
}
DynAPI.onLoad = function() {
myLayer = new DynLayer(null, 100, 100, 100, 100, '#c0c0c0');
// create EventListener object
myEventListener = new EventListener(myLayer);
// define onmouseover event handler for myEventListener object
myEventListener.onmouseover = function(e) {
MakeLayer();
}
// define onmouseout event handler for myEventListener object
myEventListener.onmouseout = function(e) {
RemoveLayer();
}
myLayer.addEventListener(myEventListener);
DynAPI.document.addChild(myLayer);
}
// -->
</script>
</head>
<body bgcolor=white> <h1>onmouseover/onmouseout Problem</h1>
</body> </html>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help