From: Pierre G. <p_g...@ho...> - 2004-03-09 17:38:55
|
I wonder how to get the location (in the page) of a layer that has a relative position in the document ? As far as I try it, the script returns the position of the layer given at its initialisation (like it was in absolute position). When asking what is the location of the layer, it don't really if it's positionned in a relative or absolute way. Help would be appreciate. ------------------------------------- <html> <head> <title>Relative Layer Location</title> <script language="JavaScript" src="../src/dynapi.js"></script> <script language="Javascript"> dynapi.library.setPath('../src/'); dynapi.library.include('dynapi.api'); </script> <script language="Javascript"> myLayer = dynapi.document.addChild(new DynLayer(null, null, null, 150,150,'red')); dynapi.onLoad(init); function init() { } </script> </head> <body bgcolor="#999999"> un peu de texte<br> <form name="myform"> un jour, de la place<br> ici ou là </form> <table border=1> <tr> <td>un texte à gauche</td> <td> <script> dynapi.document.insertChild(myLayer,'relative'); </script> </td> </tr> </table> <a href="javascript:alert(myLayer.getX());">test</a> </body> </html> _________________________________________________________________ MSN Search, le moteur de recherche qui pense comme vous ! http://search.msn.fr/ |