Gotta problem. I have a page that onload a popup window comesup, within that popup window there is a link to another .htm page. I need that link to display the .htm file in the main browser window.(use the opener keyword to reference the main browser window, and the location.href property to specify the document to be displayed(form. htm)in that window., and slo close the current window.
Below is what i have right now, it loads the popup window(subscrip tions)correctly , when i press the link in the popup window it opens the form.htm in the popup window instead of the main browser window.
The form.htm still opens in the popup window instead of the main browser window
Below is what i have right now, it loads the popup window(subscrip tions)correctly , when i press the link in the popup window it opens the form.htm in the popup window instead of the main browser window.
Code:
<title>Subscription</title>
<link href="cover.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function showForm(URL){
window.opener.location.href="form.htm";
window.close();
}
</script>
</head>
<body>
<div id="main">
<p><a href="form.htm">
<b>Order 12 issues <br />for: $9.95*</b>
</a>
</p>
<p><img src="cover.jpg" alt="The Civil War Journal" /><br />
*25% off the <br />newsstand price!</p>
</div>
</body>
</html>
Comment