Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/12/2012, 05:30
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Respuesta: Insertar y recuperar datos en el mismo formulario dinamicamente.

Cita:
Iniciado por rosonator Ver Mensaje
Claro que se puede

SET
document.GetElementById('id').value = "tararí"

GET
var valorInput = document.GetElementById('id').value

supongo que querrás enlazarlos a eventos por lo que esto irá dentro de funciones que a su vez serán llamadas por atributos OnClick, OnChange, OnMouseOver,etc. en tus botones, textfields, etc.
He encontrado esto. Que os parece?
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=iso-8859-1" />
<
title></title>
<
script>
function 
enviarForms(){
    if(
document.forms.length>1){
        var 
ifr='<iframe name="pp" width="1" height="1" style="visibility:hidden"></iframe>';
        
document.getElementsByTagName('body')[0].innerHTML+=ifr;
        for(var 
i=0;i<document.forms.length-1;i++){
            
document.forms[i].target='pp';
            
document.forms[i].submit();
        }
        
    }
    
document.forms[document.forms.length-1].submit();
}
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="test.php">
</form>
<form id="form2" name="form2" method="post" action="http://www.yahoo.com">
</form><br />
<a href="javascript:enviarForms()">enviar</a>
</body>
</html>