Click to See Complete Forum and Search --> : Pull Down menu Options need to open in New Window


fitzi
08-28-2003, 11:41 AM
We have a pulldown menu that lists other websites for users reference. I'd like the items on the list to open in a new window and not replace the site. Here are two sections of the code. I've tried numerous things and nothing is working. Any ideas?


function selectHOME()
{
//use this function to process Site navigation

choice=document.Home.IndexItem.selectedIndex;
if (choice==1)
{
top.location.href="http://address.htm";
}

Then further down the selections are:

<form name="Home"><td align="left"><font size="-3" face="tahoma">
<select name="IndexItem" onchange="selectHOME();document.location.reload();" style="font: 7pt Tahoma; background: ffffff">
<option value="" selected>Websites
<option>Site One

requestcode
08-28-2003, 11:57 AM
Here is an example of one way you can do it:
<html>
<head>
<title>Drop Down Test</title>
<script language="javascript">
function LinkUp(obj)
{
linkid=obj.options[obj.selectedIndex].value
NewWin=window.open(linkid,"win1",config="width=200,height=250,location=no,status=no,directories=no,toolbar=no,scrollbars=no,menubar=no,resiza ble=no,top=30,left=30")
}

</script>
</head>
<body bgcolor="lightgreen">
<form name="DropDown">
<select name="DDlinks" onchange="LinkUp(this)">
<option selected>Choose a Link
<option value="http://www.htmlgoodies.com"> HTML Goodies</option>
<option value="http://www.wsabstract.com"> Website Abstraction</option>
<option value="http://www.requestcode.com"> Request Code</option>
</select>
</form>
</body>
</html>