I'm able to use document.getElementById() fine when working with the same page, but I haven't been able to figure out how to get the element by it's ID from a different page. So far, my guess has been to use jQuery's $.get function, which I haven't gotten to work either.
$(function() {
$('#inputform').submit(function(e) {
e.preventDefault();
var rawnum = $('#inputform').serialize();
var num = rawnum.split("=")[1];
var url = "http://google.com/"; //this url is an example
$.get(url, function(data, status) {
$("html").html(data);
});
});
});
Your page would need to be the opener and the other page and, more importantly, the two pages would have to be served by the same origin (see same origin policy) or that other page would have to be served with CORS headers precising this access is authorized.
As your example shows, this is obviously not the case so you simply can't access the element.