Parent layers can not have html content. That is just the nature of
"layers". So when you have a parent with children, if you use setHTML
it will kill all of its children. That is exactly what you would
expect to happen and its not a bug in the DynAPI.
--
Robert Rainwater
On 5/10/2001, 6:50:23 PM EST, Chris wrote about "[Dynapi-Help] Why does
dynlayer.setHTML(dynlayer.getHTML()) destroy all the children of the dynlayer??":
> I posted this yesterday in the dev list and didn't get any response. Do I simply
>not understand something here or is this a valid
> issue/bug?
> Here's a simple example of setting a parent dynlayers html (to itself) and
>destroying its child.
> Dev notes: I've checked the innerHTML and outerHTML both before and after calling
>setHTML() and they are identical.
> Why does this happen?? This doesn't seem like reasonable behavior for this method.
>It seems to me if I set a dynlayers HTML to
> dynlayer.getHTML() then I should see the exact same thing, but I don't. Instead
>dynlayers children get blown away. Is there a way to fix this or am I using this
>method incorrectly?
> Here is a code snippet:
> <html>
> <head>
> <script language="Javascript" src="../src/dynapi.js"></script>
> <script language="Javascript">
> DynAPI.setLibraryPath('../src/lib/');
> DynAPI.include('dynapi.api.*');
> DynAPI.onLoad = function() {
> aPanel=new DynLayer(null,150,200,300,150,'orange')
> aPanel.setHTML('hi')
> panel2=new DynLayer(null,30,30,100,50,'brown')
> panel2.setHTML('panel2')
> aPanel.addChild(panel2)
> DynAPI.document.addChild(aPanel)
> }
> </script>
> </head>
> <body bgcolor="lightblue">
> <form>
> <input type=button value=Click me onclick='aPanel.setHTML(aPanel.getHTML())'>
> </form>
> </body>
> </html>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help