Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/09/2010, 10:16
Karla_vs
 
Fecha de Ingreso: febrero-2010
Mensajes: 85
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: Pasar valor de variable a un iframe

caricatos lo siento pero no te entendi muy bien, ¿te refieres a convertir el boton buscar en un enlacey hacer un onclick a una funcion que cambie la ruta?
Por ejemplo:
Código PHP:
<a href="" onClick="buscar()">Buscar</a>
<
iframe id="enlace"></iframe
Ahi hago el enlace y ahora utilizo la funcion buscar para cambiar la ruta del iframe:

Código PHP:
function buscar()
{
    var 
variable
    variable
=document.getElementById("valor").value;
    
document.getElementById("enlace").src="http://ruta.php?variable='variable'";

El codigo creo que no esta muy bien pero para saber si por ahi van los tiros.

Muchisimas gracias!