<script type="text/javascript">
function navigateTo(sel, target, newWindow) {
var url = sel.options[sel.selectedIndex].value;
if (newWindow) {
window.open(url, target, '--- attributes here, see below ---');
} else {
window[target].location.href = url;
}
}
</script>
<select onchange="navigateTo(this, 'window', false);">
<option selected="selected" value="http://www.example.com/#X">Change to URL X</option>
<option value="http://www.example.com/#Y">Change to URL Y</option>
</select>
Algunos valores útiles de target
podrían ser 'window'
(la ventana actual) o 'top'
(para salir de un conjunto de marcos o un iframe). Si desea abrir una nueva ventana en su lugar, se puede utilizar navigateTo(this, 'someWindow', true);
El valor de '--- --- atributos' se ajusta con diversas propiedades como se documenta here for Mozilla y here for IE. Por ejemplo:
'height=300,width=400,top=100,left=100,statusbar=0,toolbar=1'
[http://www.cs.tut.fi/~jkorpela/forms/navmenu.html](http://www.cs.tut.fi /~jkorpela/forms/navmenu.html) tiene una buena guía (que incluye algunas buenas razones por las que no deberías hacer esto). – Quentin