Cita: hacéis cosas muy extrañas.
valla que si
me gusto el desafio yo tampoco lo hise nunca pero aqui esta:
Index.html/php:
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <Script Type="text/javascript"> function AgregarCampos(ID,VAL){
campo = '
<input type="hidden" id="'+ID+'" name="'+ID+'" value="'+VAL+'" />';
$('#formulario').append(campo);
}
function CargarCamposIframe(){
$(".Indirecto",datos.document).each(function(){
AgregarCampos($(this).attr('id'), $(this).val());
});
$('#formulario').submit();//Esta linea envia el formulario
}
<form action="Recepcion.php" method="post" id="formulario">
Nombre:
<input type="text" name="txt_Nombre" /> <iframe src="Frame.html" width="500" height="300" name="datos" id="datos" ></iframe>
<button name="btn_Ingresar" onclick="CargarCamposIframe();">Enviar
</button>
Frame.html/php:
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Direccion
<input type="text" name="txt_Direccion" id="txt_Direccion" Class="Indirecto" value="hola"/>
con ese codigo, todos los elementos de la clase Indirecto dentro del iframe se comportaran como si estubiesen en la misma pagina que el formulario al hacer click en el boton.
saludos.