I'm working on my personal site and I'm having some problems. I'm using CSS positioning, and I have 1 main DIV layer, with multiple DIV's in it. I'm trying to access one of the DIV layers through JS.
where obj is the name of the DIV layer.
However it always returns null. I try to do this:
But it always errors out and says:
If this is confusing, tell me...I'll post my code then.
~ROSEBLOOD
Code:
var el = document.getElementById(obj);
where obj is the name of the DIV layer.
However it always returns null. I try to do this:
Code:
var el = document.page_body.main.menu.getElementById(obj)
But it always errors out and says:
document.page_body.main is null or not an object
If this is confusing, tell me...I'll post my code then.
~ROSEBLOOD