shashgo
08-27-2002, 10:05 PM
I am trying to control the original window through a pop up window, but I just cant seem to get it to work. I need help with doing this.
<!--The code for the main window-->
<html>
<head>
<script language="javascript">
window.open(''","popup","width=400,height=400");
popup.document.write("Click the button to load a new URL in the main window"+<br>);
popup.document.write("<input type='button' value='Load new URL in the main window' onClick='javascript:top.location.href=http://www.yahoo.com');
</script>
<body>
Click<a href="javascript:OpenWin()">here</a> to open new window
</body>
</html>
This is what Im trying to do:
- click a link in the main window to open a popup window
- Have the main window add a link in the popup window
- when the user click the link in the popup window, the yahoo web page is loaded in the main window
Please help!!
<!--The code for the main window-->
<html>
<head>
<script language="javascript">
window.open(''","popup","width=400,height=400");
popup.document.write("Click the button to load a new URL in the main window"+<br>);
popup.document.write("<input type='button' value='Load new URL in the main window' onClick='javascript:top.location.href=http://www.yahoo.com');
</script>
<body>
Click<a href="javascript:OpenWin()">here</a> to open new window
</body>
</html>
This is what Im trying to do:
- click a link in the main window to open a popup window
- Have the main window add a link in the popup window
- when the user click the link in the popup window, the yahoo web page is loaded in the main window
Please help!!