Hi, Experts,
I have some difficulties in javascript again. Here is what I want:
1) on one web page (call it parent window), under certain condition, a popup window (call it child window) will be poped up. -- This is done
2) There is a url link (e.g. on the newly popup window (call it child window). Once you click it, I want the parent window showing cnn's main page. But I don't know how.
Here is my partial code for the child window page:
I know the problem is here
But I don't know what value I should use to substitute '_new_', so that the parent window will display cnn.com, once we click on link "Click here to redirect" on the child window? Please help. Many thanks!
I have some difficulties in javascript again. Here is what I want:
1) on one web page (call it parent window), under certain condition, a popup window (call it child window) will be poped up. -- This is done
2) There is a url link (e.g. on the newly popup window (call it child window). Once you click it, I want the parent window showing cnn's main page. But I don't know how.
Here is my partial code for the child window page:
Code:
<html>
<head>
<script type="text/javascript">
function func1()
{
window.open('/', '__new__');
window.setTimeout("window.close()", 800);
}
</script>
</head>
<body>
<a href="javascript:func1();"><img src="/images/abc.gif" width="444" height="75" alt="Click here to redirect"></a>
</body>
</html>
I know the problem is here
Code:
window.open('[URL unfurl="true"]http://www.cnn.com',[/URL] '_new_');
But I don't know what value I should use to substitute '_new_', so that the parent window will display cnn.com, once we click on link "Click here to redirect" on the child window? Please help. Many thanks!