La Web del Programador: Comunidad de Programadores
 
    Pregunta:  3388 - COMBINAR FORMULARIOS E HIPERVINCULOS
Autor:  Guido Mejia Comesaña
TENGO UNA LISTA Y VARIOS HIPERVINCULOS, LO QUE QUIERO ES DAR CLICK EN UN ELEMENTO DE LA LISTA Y QUE SE SELECCIONE UNA RUTA Y CON UN HIPERVÍNCULO ENLAZAR LA PAGINA SELECCIONADA EN LA RUTA ELEGIDA.
DE ESTA MANERA ESCOJO UNA PAGINA DE UN DETERMINADO MES Y SI QUIERO CAMBIAR DE MES SOLO LO ESCOJO DEL LISTBOX Y DOY CLICK EN EL HIPERVINCULO.

PARA ESTO NECESITO SABER COMO ESCRIBIR EL CODIGO DEL FORMULARIO Y COMO ENLAZARLO AL HIPERVINCULO.

AH ES LA PAGINA CABECERA DE UNA PAGINA DE MARCOS POR LO QUE EL RESULTADO DEL HIPERVINCULO APARECERA EN LA PRINCIPAL

  Respuesta:  Xavi
Este el codigo:

<script language="JavaScript">
function sendIt(fileName) {
if (fileName != "") {
location.href=fileName
}
}
</script>

en la opcion donde quieras que se seleccionen las opciones

<select NAME="Opciones" onChange="sendIt(this.options[selectedIndex].value)" size="1">
<option value="pagina1.htm">Pagina 1</option>
<option value="pagina2.htm">Pagina 2</option>
</select>

Espero que te sirva.

  Respuesta:  dani
Tienes que construie el enlace una vez se haya pulsado el evento en una funcion que contuviese
document.open(url,name,features,replace) donde el parametro importante sera url, el cual lo construiras como una cadena de caracteres recogida del List del formulario