From: Daniel A. <dan...@ne...> - 2001-02-06 17:16:53
|
Hi! I've been playing around a bit with DynAPI II, and ran into a rather strange behaviour under Netscape 4.7. Basically, if you do setHTML on a layer from within an onClick event set on a link in the layer, the browser will also try to load a garbage page. This sample page produces the mentioned result on my NS4.7 platform: -------------------->8-------------------- <html> <head> <title>Strange behaviour?</title> <script language="javascript" src="dynapi/src/dynapi.js"></script> <script language="javascript"> <!-- DynAPI.setLibraryPath('dynapi/src/lib') DynAPI.include('dynapi.api.*') DynAPI.onLoad = function() { myLayer = new DynLayer(null, 100, 100, 200, 50, 'silver') myLayer.setHTML('<a href="#" onClick="myLayer.setHTML(\'Updated content\')">Initial content</a>') DynAPI.document.addChild(myLayer) } // --> </script> </head> <body> </body> </html> -------------------->8-------------------- Any ideas as to what might be the problem here? I'm rather new to DynAPI II, so please do tell me if there's something I've overlooked. Thanks! /Daniel -- Daniel Aborg <dan...@ne...> +44-(0)7765-961155 |