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,frame page) {
myWindow=window .open(page1,'wi ndow');
myWindow.frames['winPanel'].location.href= framepage;
if (window.focus) {myWindow.focus ()}
}
</script>
</head>
<body>
<a href="javascrip t:"
onClick="run('s croll.html','te mp.html');">cli ck4local</a>
<a href="javascrip t:"
onClick="run('h ttp://www.mysite.com/page_with_ifram e.htm','http://www.mysite.com/page_to_go_in_i frame.htm;">cli ck4remote</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.ifram es.winPanel.loc ation 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
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,frame page) {
myWindow=window .open(page1,'wi ndow');
myWindow.frames['winPanel'].location.href= framepage;
if (window.focus) {myWindow.focus ()}
}
</script>
</head>
<body>
<a href="javascrip t:"
onClick="run('s croll.html','te mp.html');">cli ck4local</a>
<a href="javascrip t:"
onClick="run('h ttp://www.mysite.com/page_with_ifram e.htm','http://www.mysite.com/page_to_go_in_i frame.htm;">cli ck4remote</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.ifram es.winPanel.loc ation 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
Comment