Click to See Complete Forum and Search --> : How to generate pop-up window w/ framesets?


geuis
02-24-2003, 07:18 AM
I would like to generate a small window that has no menus, buttons, address bar, etc. Just the page itself.
I need to have the window load the following frameset code.

<html>
<head>
<title>Little Window</title>
</head>

<frameset rows="200,700" border="2">
<frame src="page1.html" noresize marginheight="0" marginwidth="0" scrolling="yes" name="menuframe">
<frame src="page2.html" name="content2">


</frameset>
</html>

I think I can use window.open to do this, but I'm not sure exactly, nor how to get the page to include my html code. Thanks.

pyro
02-24-2003, 07:29 AM
Enter this code in the <head> of the page you want to open the window from:

<script language="javascript" type="text/javascript">
function openwin(url)
{
var properties = "width=200,height=200"; //default for other values is "no"
var name = "yourwin";
window.open(url,name,properties);
}
</script>

and then some code like this to open it:

<a href="your.html" target="_blank"
onclick="openwin(this.href);return false;">Open a new window</a>