layers in javascript - identifying layers in javascript

They have: 2 posts

Joined: Aug 1999

i cant seem to find a way to identify my layers in javascript to make them visible/hidden on a click. Im using the <div> tag to identify the layer, but when i try to code it in js, it tells me that doc.divname.layer[layername(ornumber)] is not an object. am i completely wrong? if anyone could help explain how to do this, i would greatly appreciate it!!!

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

It is different in both browsers if I recall correctly.

IE:
document.all.divname.style.property

NS:
document.divname.property

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 2 posts

Joined: Aug 1999

yup...i was missing that .all thanks a alot!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.