Hi,
I am trying to add a child inline layer to another layer.
Netscape 6 works fine, but IE 5.0 brakes with core dumped :)

Thats what i do:

1. I define wy own widget

function MyWindow( id, x, y, width, height, contentLayer )
{
        this.superClass = DynLayer;
        this.superClass(null,x,y,width,height,'#000000');
        this.id="DynWindow"+(DynWindow.Count++)

        if ( contentLayer != null )
        {
                this.contentPane = contentLayer;
                this.contentPane.setSize( width-2, height-19 );
                this.contentPane.moveTo( 1, 18 );
                this.contentPane.setBgColor( '#AAAAAA' );
        }
        else
                this.contentPane = new DynLayer( 
null,1,18,width-2,height-19,'#AAAAAA');

        this.addChild( this.contentPane );

        return this;
}

2. Define my inline layer in html and create myWindow:

<script language="Javascript" src="js/dynapi/src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('js/dynapi/src/lib/')
DynAPI.include('dynapi.api.*')
DynAPI.include('dynapi.ext.inline.js')
DynAPI.include('window.js', 'js/')

DynAPI.onLoad=function() {

    mywin = new DynWindow( null, 10, 300, 200, 200, DynAPI.document.all["testLayer"] );

    DynAPI.document.addChild( mywin );

    mywin.resize( 100, 100 );
    DragEvent.enableDragEvents( mywin )
}
</script>
</head>

<body>
<b>First line</b><br>
<div id="testLayer" style="width:1px; height:1px; position:absolute;">
Testing inline layers  d dddd d d d d d d d d d d d d d d d d d d d d d d dd d d d d d 
d d d d d d dd d d  dd d d dd
</div>
<b>Next line</b>
</body>

I found that if i don't specify position:absolute; IE works fine,
but NS6 makes big space beetween lines "first" and "next" (and this is not what i 
want).

Any idea how to work around this IE bug ?

Thanks,
Krzysztof

Ps. Another question is how can i check  in NS6 if procedure parameter 'contentLayer' 
is specified ?

        If ( contentLayer != null )

gives true all the time.


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

Reply via email to