Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/05/2011, 11:54
Avatar de RollerSky
RollerSky
 
Fecha de Ingreso: marzo-2008
Mensajes: 123
Antigüedad: 16 años, 1 mes
Puntos: 8
Respuesta: formulario pos para redireccionar sin motrar

pues... vamos a ver si entendi..

intentalo asi:

1. pones el formulario normal ya que todos los campos son hidden no se vera el form.
<FORM ACTION="http://www.aaaaa.es" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" id="miform">
<INPUT NAME="a" TYPE="hidden" VALUE="el que sea">
<INPUT NAME="b" TYPE="hidden" VALUE="el que sea">
<INPUT NAME="c" TYPE="hidden" VALUE="el que sea">
</FORM>

2. con Javascript haces el submit.


<script>
function Submit(){
document.forms["miform"].submit();
}
</script>


3. y cuando necesites que se haga el submit llamas la funcion Submit(); ya sea en el onload de la pagina o en un evento



aqui ejemplo completo:

Código PHP:
<!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">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Untitled Document</title>
<
script>
function 
Submit(){
document.forms["miform"].submit();
}
</script>
</head>

<body>

<FORM ACTION="http://www.google.com" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" id="miform" name="miform">
<INPUT NAME="a" TYPE="hidden" VALUE="el que sea">
<INPUT NAME="b" TYPE="hidden" VALUE="el que sea">
<INPUT NAME="c" TYPE="hidden" VALUE="el que sea">
</FORM>

<script>
 Submit();

</script>
</body>
</html> 
__________________
www.sawedsa.com