Forum Moderators: open
<script type="text/javascript" language="JavaScript">
function openPopup(type)
{
var centerX = ((screen.width / 2) - 250); //Half the screen size minus half the size of the popup window
var centerY = ((screen.height / 2) - 150);
var popupWindow = window.open("popup.asp?type=" + type,"test", "width=500, height=300, top="+ centerY +", left="+ centerX +", menubar=no , toolbar=no, scrollbars=no, resizable=no, status=no");
}
</script>
</head>
<body>
<form name="myform">
<span>Person:</span>
<select>
<option>Person 1</option>
<option>Person 2</option>
<option onclick="openPopup('PassedData')">Enter New Person Info</option>
</select>
</form>
<body>
</html>
------------------------------------------------------
thanks,
Mike
<html>
<head>
<script type="text/javascript" language="JavaScript">function openPopup(select)
{
var type = select.options[select.selectedIndex].value;
if(!type)return;
var centerX = ((screen.width / 2) - 250); //Half the screen size minus half the size of the popup window
var centerY = ((screen.height / 2) - 150);
var popupWindow = window.open("popup.asp?type=" + type,"test", "width=500, height=300, top="+ centerY +", left="+ centerX +", menubar=no , toolbar=no, scrollbars=no, resizable=no, status=no");
}</script>
</head>
<body>
<form name="myform"><span>Person:</span>
<select onchange="openPopup(this)">
<option>Person 1</option>
<option>Person 2</option>
<option value="PassedData">Enter New Person Info</option>
</select>
</form>
<body></html>