Re: OFF TOPIC :(SUBMIT )
| From: | Remy | Date: | Thu, 20 Nov 2003 14:39:22 +0000 |
| Subject: | Re: OFF TOPIC :(SUBMIT ) | ||
| References: | 1 2 3 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-42858@lists.php.net to get a copy of this message | ||
Por que no haces una rutina en JavaScript y ahi le asignas el valor de donde
quieres enviar el submit.
Por ejemplo:
<SCRIPT LANGUAGE="JavaScript">
function Cambiar(id){
if (id==1){
document.forms[0].action= '<?=$PHP_SELF?>';
document.forms[0].submit();
}
if (id==2){
document.forms[0].action= ' <?=$_SESION['PHP_SELF']?>';
document.forms[0].submit();
}
}
</script>
***********************************************
Y en el formulario haces esto:
<form name="form1" method="post" action="">
<input type="button" value="Enviar a 1" onClick="cambiar(1)">
<input type="button" value="Enviar a 2" onClick="cambiar(2)">
</form>
No creo sea la mejor via pero me resueklve muchisimo, espero a ti tambien