Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/09/2008, 08:31
paulamg
 
Fecha de Ingreso: septiembre-2008
Mensajes: 33
Antigüedad: 15 años, 8 meses
Puntos: 0
Mensaje Fomulario con 3 action y un solo botón, problema con Firefox

Hola! Tengo una página con un formulario en el que el usuario insertar un nombre y una contraseña, las cuales paso a una segunda página en la que tengo tres formularios ocultos (los tres con los mismos campos pero con distintos form action) su utilidad es que al cargar la página mediante un onload inserte el nombre y la contraseña en tres bases de datos distintas (foros, usuario, y otra), en internet explorer me funciona perfectamente el problema es que en Firefox no lo hace. Os dejo el código de la segunda página para ver si me podeis ayudar, ya he probado a cambiar en el script "document." por "this." y sigue sin funcionar.
Gracias por vuestra ayuda.


<?

$usuario = $_POST['log'];
$pass = $_POST['pwd'];

?>
<html>
<head>
</head>
<body onLoad="document.todo.button1.click();">

<script language=javascript>
<!--
function OnButton1()
{


document.soci.action = "http://www.xxxxxxxxxxx.xx/index.php?action=member_login" // First target
document.soci.target = "iframe1"; // Open in a iframe
document.soci.submit(); // Submit the page
document.login.action = "http://www.yyyyyyyyyyyy/index.php?" // Second target
document.login.target = "iframe2"; // Open in a iframe
document.login.submit(); // Submit the page
document.loginform.action = "aaaaaaaa.php" // Second target
document.loginform.target = "iframe3"; // Open in a iframe
document.loginform.submit(); // Submit the page
// Submit the page
return true;
}
-->
</script>
<div align="center">



<form action=" http://www.xxxxxxxxxxx.xx/index.php?action=member_login" method="post" id="soci" name="soci">
<input type="hidden" name="referer" value="http://www. xxxxxxxxxxx.xx /socios/index.php" />
<input type="hidden" name="user_name" value="<? echo $usuario; ?>" maxlength="30" />
<input type="hidden" name="user_pass" value="<? echo $pass; ?>" maxlength="30" />
<input type="hidden" name="remember" />
<input name="submit2" type="hidden" id="boton" value="1" />
</form>


<form action=" http://www.yyyyyyyyyyyy/index.php?" method="post" class="formStyle" id="login" name="login">
<input type="hidden" size="10" maxlength="40" name="user_usr" value="<? echo $usuario; ?>" class="textForm" tabindex="3" />
<input name="user_pwd" type="hidden" class="textForm" tabindex="4" value="<? echo $pass; ?>" size="10" maxlength="32" />
<input type="hidden" name="mode" value="login" />
<input type="hidden" name="queryStr" value="" />
<input type="hidden" name="pagetype" value="index" />
<input name="submit22" type="hidden" class="inputButton" tabindex="5" value=" 2" />
</form>


<form name="loginform" id="loginform" action=" aaaaaaaa.php" method="post" >
<input type="hidden" name="log" id="user_login" class="input" value="<? echo $usuario; ?>" size="20" tabindex="10" />
<input type="hidden" name="pwd" id="user_pass" class="input" value="<? echo $pass; ?>" size="20" tabindex="20" />
<input name="rememberme" type="hidden" id="rememberme" value="forever" tabindex="90" />
<input type="hidden" name="fa-submit" id="fa-submit" value="3" tabindex="100" />
<input type="hidden" name="redirect_to" value="/?page_id=120" />
<input type="hidden" name="testcookie" value="1" />
</form>

<div style="visibility:hidden">
<IFRAME NAME="iframe1" WIDTH="40" HEIGHT="40"></IFRAME>
<IFRAME NAME="iframe2" WIDTH="40" HEIGHT="40"></IFRAME>
<IFRAME NAME="iframe3" WIDTH="40" HEIGHT="40"></IFRAME>
</div>

<form action= "http://www.midominio.es?page_id=18" method=post id="todo" name="todo">
<INPUT type="submit" value="" name="button1" onClick="return OnButton1();">
</form>

</body>
</html>