Get ID from layer

wxdqz

New Member
Hi

I have some DHTML code the does some moving layers about.

I have the following code for example that moves a layer from top of the scree to the bottom

<DIV ALIGN="center" ID="Navbar1" onmouseout="javascript:MouseOutContext(Navbar1); " onmouseover="javascript:MouseOverContext(Navbar1); "><A HREF=http://www.webdeveloper.com/forum/archive/index.php/"javascript:slideout(LAYER1)" class="done">click this</A></DIV>

Where LAYER1 is another layer based on a style #LAYER1
My slideout function then as you is passed the the LAYER1 object reference

function slideout(WHICHLAYER) {

/*code that does the layer move*/

}


What I want to know is can I get the ID property back from the layer object again, as in the slideout function I want to store this away somewhere. I've tried WHICHLAYER.id, WHICHLAYER.name, whichlayer.style

but all are returned as undefined is there a reverse GETELEMENTBYID function I can use? Sorry if some of my terminology is wrong here, but my limited very JS knowledge is self taught

Thanks
 
Back
Top