Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/08/2008, 09:05
Avatar de Un_Tico
Un_Tico
 
Fecha de Ingreso: julio-2008
Ubicación: Cartago, Costa Rica
Mensajes: 176
Antigüedad: 15 años, 10 meses
Puntos: 4
Respuesta: pasar de un prompt a formulario

Mmmm...

Mas o menos, creo que lo que quieres hacer es esto:

Código HTML:
<!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 type="text/javascript">
function assign_prompt_value(){
document.getElementById('campo_de_texto_en_form').value = prompt('Ingresa el dato','');
}
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label>
  <input type="text" name="campo_de_texto_en_form" id="campo_de_texto_en_form" />
  </label>
  <label>
  <input type="button" name="button" id="button" value="Button" onclick="assign_prompt_value()" />
  </label>
</form>
</body>
</html>

Saludos...