The below code will sove your problems, and works in NS4+ & IE4+

<!--//
/*

DynAPI.onLoad = function() {
    var doc = this.document;
    var whatevervariable = doc.all['layeridhere'];
};

*/
//-->

--proteanman

On Fri, 26 January 2001, "Abel Eduardo Cantu Salas" wrote:

> 
> Hi there!
> im having serious problems getting references to dynamically created
> layers... Somebody knows how to get a reference to a DynLayer object knowing
> only its id (for instance "JSDynLayer1")?.
> 
> in IE i used this code:
> document.all["JSDynLayer1"];    //So easy!!
> 
> but i just cant find a way of doing this in NS 4 +...
> 
> document.layers, document.layers[idx].layers, etc; are reporting layers with
> ids like this: _js_layer_238, _js_layer_121, etc...
> 
> And having in mind that the page only has the DynLayer objects i created in
> the onload event, i supose that the problem is that in NS, the DynLayers are
> lossing their ids or something like that.
> 
> somebody knows whats going on?
> 
> 
> 
> 
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help

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

Reply via email to