so, im trying to write a function that will open a page in a new window
(http://giantmecha.com) and then load a different page into an iframe (the main
one, with id 'contentFrame') on that page.
i think the code pretty much explains what ive tried, the only thing i should
explain is that the commented out line was a test i had to see if the
getElementById was working (it seems not to be, because when i use that test it
opens google--meaning getElementById returned null).
thanks so much
function giantmechaize() {
newWindow = window.open("http://giantmecha.com/");
if (newWindow.document.readyState == "complete") {
newWindow.document.getElementById("contentFrame").src =
"http://www.giantmecha.com/2005/12/more-hot-design.html";
//if (newWindow.document.getElementById("contentFrame") == null)
{window.open("http://google.com")}
}
return null
}