I tried it, and in NS4.08 it works normally, unless you reload/click_link
many times, when it gives a server error.
I tried replacing the" #" with "javascript: void(0)" with the same result.
looks like a browser issue, and probably the easiest workaround is to keep
the links in one layer, which is hidden to display the second layer.
Cheers,
Richard Bennett
ma...@ri...
www.richardinfo.com
(Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2)
----- Original Message -----
From: "Daniel Aborg" <dan...@ne...>
To: <dyn...@li...>
Sent: Tuesday, February 06, 2001 6:12 PM
Subject: [Dynapi-Dev] Strange behaviour with setHTML/onClick in NS4.7 Win32
> 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
>
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
> ____________________________________________________________
> Get your free domain name and domain-based e-mail from
> Namezero.com. New! Namezero Plus domains now available.
> Find out more at: http://www.namezero.com
>
|