Solved

document.getElementById fails

Posted on 2006-10-23
5
557 Views
Last Modified: 2006-11-18
why might    document.getElementById("XYZ")     fail?    I can look at the page source and see the table ID "XYZ" in the page...and can only find one such ID (searched, using pagespy).....plus it was working before I made the latest round of changes...

But it keeps coming up null.

Any suggestions would be appreciated.

Thanks!
0
Comment
Question by:codequest
5 Comments
 
LVL 30

Accepted Solution

by:
callrs earned 400 total points
ID: 17792615
Syntax error In the HTML or in the javascript. Try Firefox browser to pinpoint errors (In FF: Tools -> Javascript Console)

Is there an equal sign? Matched quotes? Matched case? etc.

<table id="XYZ">
0
 
LVL 54

Assisted Solution

by:b0lsc0tt
b0lsc0tt earned 75 total points
ID: 17792701
codequest,

What were the changes you made?  Besides the good things mentioned by Callrs the message may be appearing because of what you are looking for when you get Null.  What is the line that is giving the Null?

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 2

Author Comment

by:codequest
ID: 17792714
Thanks for input.  Problem shifted...I'm working on a puzzle and this was a test case.  Points will be awarded...I'll leave this open a while to see if need reappears.
0
 
LVL 41

Assisted Solution

by:HonorGod
HonorGod earned 25 total points
ID: 17796179
1 possibility is a syntax error in the element associated with the specified ID
0
 
LVL 2

Author Comment

by:codequest
ID: 17796190
Thanks for input.  This is resolved...must have been what callrs suggested.   Points to others for cross-validation.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now