Is the other page, in fact, in the document at the time that you run this Javascript code? Did you inspect the DOM using Web Inspector, Firebug, etc?
jQuery Mobile discards pages once it no longer needs them. If you want to keep a page in the DOM, you can use data-dom-cache="true" on the page div.
Why are you using getElementByID()? You have the power of jQuery, so use it. It is both easier to use than native DOM methods, as well as accommodating many differences between browsers.
Other than that, I can't help with this little information. We really need to see a complete example, not just the parts where you think the problem might be. The problem almost always is in something you haven't shown.
You are only going to bring yourself trouble by using IDs. Use classes instead. Search the forum for why.