Hi.

I could add DynLayers by using onMouseOver events in a common <A> link.
Now I need to set the X and Y position of the layer basead in the mouse
position of the document.

The result I'm trying to get is simple: just open a DynLayer at the mouse
position when it runs over a common <A> link. And I don't need to change
those values. Just see the code below. It's quite simple.

Any ideas?
Thank you!

Volponi

<html>
<head>
<title>DynAPI Distribution: Delete Example</title>
<script language="Javascript" src="dynapi/src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('dynapi/src/lib/');
DynAPI.include('dynapi.api.*');
</script>
<script language="Javascript">

function MakeLayer(text,sizex,sizey){
/* --------------------------------------------------
I have to check the mouse here, to return mouse positioning values
-----------------------------------------------------*/
    mousex = 200
    mousey = 200
/* --------------------------------------------- */
    var dlyr = new DynLayer(null,mousex,mousey,sizex,sizey,'yellow');
 dlyr.setHTML(texto);
 DynAPI.document.addChild(dlyr);
}

function DeleteLayer(){
 if (DynAPI.document.children.length>0) {

DynAPI.document.children[DynAPI.document.children.length-1].deleteFromParent
()
 }
 else alert('All layers are removed.')
}

</script>
</head>

<body>
<a href="#" OnMouseOver="javascript:MakeLayer('My own text',200,50)"
onMouseOut="javascript:DeleteLayer()">Make layer</a><br>


</body>
</html>


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

Reply via email to