instead of opening a page in the same browser window, I want to open the url (e.g. beh.html) in a popup window. How can I change my script that way?
<script type="text/javascript">
function buildArray()
{
var a = buildArray.arguments;
for ( var i=0; i<a.length; i++ )
{
this = a;
}
this.length = a.length;
}
var urls1 = new buildArray("",
"beh.html",
"gen.html");
function go ( which, num, win )
{
var n = which.selectedIndex;
if ( n != 0 )
{
var url = eval ( "urls" + num + "[n]" )
if ( win )
{
openWindow ( url );
}
else
{
location.href = url;
}
}
}
</script>
<form name="form1">
<select name="menu1" onchange="go(this, 1, false)">
<option>OPEN
<option>BEH
<option>GEN
</select>
</form>
<script type="text/javascript">
function buildArray()
{
var a = buildArray.arguments;
for ( var i=0; i<a.length; i++ )
{
this = a;
}
this.length = a.length;
}
var urls1 = new buildArray("",
"beh.html",
"gen.html");
function go ( which, num, win )
{
var n = which.selectedIndex;
if ( n != 0 )
{
var url = eval ( "urls" + num + "[n]" )
if ( win )
{
openWindow ( url );
}
else
{
location.href = url;
}
}
}
</script>
<form name="form1">
<select name="menu1" onchange="go(this, 1, false)">
<option>OPEN
<option>BEH
<option>GEN
</select>
</form>