Hi,
I've struggled with this for a while now, so I'm asking for help. I
am trying to click on a link in one page, have that link open up in a
new window, and set that newly opened window's ifram to a specific
url. Here is the code I'm using:
<html>
<head>
<script>
var myWindow;
function run(page1,framepage) {
myWindow=window.open(page1,'window');
myWindow.frames['winPanel'].location.href=framepage;
if (window.focus) {myWindow.focus()}
}
</script>
</head>
<body>
<a href="javascript:"
onClick="run('scroll.html','temp.html');">click4lo cal</a>
<a href="javascript:"
onClick="run('http://www.mysite.com/page_with_iframe.htm','http://www.mysite.com/page_to_go_in_iframe.htm;">click4remote</a>
</body>
</html>
The strange this is that the first link works just fine when I run it
locally, but the second link won't work when I put it on my server.
It opens up a page with the iframe, but I get the error "line: 10
character 2 'myWindow.iframes.winPanel.location is null or not an
object," so it doesn't load the url into the iframe.
I appreciate any help you can give me!
Jim