html20009876
04-14-2005, 12:46 AM
<html>
<head>
<script type="text/javascript">
var mySel;
function getMultiple(ob)
{
if (ob.selectedIndex != -1)
{
mySel=ob.options[ob.selectedIndex].value;
}
}
function DispPage()
{
confirm(mySel);
location.href=mySel.toString()
}
</script>
</head>
<body>
<form name='frmSelect'>
<select name='numbers' multiple='multiple' onblur='getMultiple(document.frmSelect.numbers);'>
<option value="http://www.sun.com/index.html">Index</option>
<option value="http://www.sun.com/download/index.jsp">Downloads</option>
</select>
<input type='submit' value='Go' onclick=DispPage();>
</form>
</body>
</html>
======================================
I hope users can go to selected sun's web-page (as new window) when they press button go .
could u help me to find errors?
thanks
<head>
<script type="text/javascript">
var mySel;
function getMultiple(ob)
{
if (ob.selectedIndex != -1)
{
mySel=ob.options[ob.selectedIndex].value;
}
}
function DispPage()
{
confirm(mySel);
location.href=mySel.toString()
}
</script>
</head>
<body>
<form name='frmSelect'>
<select name='numbers' multiple='multiple' onblur='getMultiple(document.frmSelect.numbers);'>
<option value="http://www.sun.com/index.html">Index</option>
<option value="http://www.sun.com/download/index.jsp">Downloads</option>
</select>
<input type='submit' value='Go' onclick=DispPage();>
</form>
</body>
</html>
======================================
I hope users can go to selected sun's web-page (as new window) when they press button go .
could u help me to find errors?
thanks