Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/10/2007, 07:37
Avatar de pinchoso
pinchoso
 
Fecha de Ingreso: octubre-2005
Ubicación: Barcelona
Mensajes: 177
Antigüedad: 19 años, 4 meses
Puntos: 0
Re: Coger variables

Hola jokings80,

para hacer lo que dices has de hacer lo siguiente:

frameset:

Código:
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  </head> 
  <frameset cols="80,*" frameborder="no" border="0" framespacing="0">
  <frame src="izquierda.html" name="izquierda" scrolling="No" noresize="noresize" id="leftFrame"  />
  <frame src="principal.html" name="principal" id="mainFrame" />
  </frameset> 
  <noframes>
    <body>
    </body>
  </noframes>
</html>
en el frame de los enlaces:

Código:
<span style="cursor:pointer" onclick="alert(parent.principal.document.getElementById('opciones').value)">enlace</span>
ahora mismo en lugar de redirigirte a la pagina que te interese tan solo te mostrará el valor del select en un alert

en la pagina del select o listado:

Código:
<select name="select" id="opciones">
  <option value="motos.htm">moto</option>
  <option value="coche.htm">coche</option>
  <option value="camion.htm">camion</option>
</select>
Entonces, deberás substituir el valor en:
alert(parent.principal.document.getElementById('opciones').value)

principal --> por el nombre de tu frame principal.
opciones --> por la id de tu select
alert --> window.location = parent.principal.document.getElementById('opciones').value;

Espero que te sirva!
__________________