Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-04-2005, 08:04 PM   #1
Baseband Member
 
ROSEBLOOD's Avatar
 
Join Date: Jun 2004
Posts: 46
Send a message via AIM to ROSEBLOOD
Default getElementById

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.
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:
Quote:
document.page_body.main is null or not an object
If this is confusing, tell me...I'll post my code then.

~ROSEBLOOD
__________________

__________________
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
--Stephen Hawking (1942 - )
ROSEBLOOD is offline   Reply With Quote
Old 09-05-2005, 12:22 AM   #2
Baseband Member
 
ROSEBLOOD's Avatar
 
Join Date: Jun 2004
Posts: 46
Send a message via AIM to ROSEBLOOD
Default

Fixed!!!

~roseblood
__________________
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
--Stephen Hawking (1942 - )
ROSEBLOOD is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0