I got a problem with getElementById().
Using it the way it's used here
works fine (i.e. getting an element with a script defined on the same page as the element it's looking for).
But if I try to call it from e.g. a FireFox extension plug-in to get hold of an element on a page that I didn't write myself, then it always returns null.
Here's another example:
If I use the DOM Inspector to look up the id of an element on a random page and then use the Execute JS to execute this simple code
were theId is the id I looked up and executed in the context of the page with that id, it always returns null. Still, calling
gives the title of that page!
What is it I don't get?