(Java Script)copiare testo di 1 un form in un altro form
Salve ragazzi,
volevo sapete come si fa ha fare in modo di copiare il testo che viene scritto in un form in un altro form,mi spiego meglio :
quando 1 scrive in 1 form ang nel secondo form viene automaticamente scritto ang, io vorrei ke fosse cosi e viceversa nel senso che se nel secondo viene scritto ang anke nel primo va scritto ang automaticamente.
E possibile=?
edit cio provato 1 po da solo ma nulla ,dopo aver letto un codice di funcool mi so messo ad adattarlo ma non va, cmq il codice è
Codice HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Nuova pagina 3</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<script language="Javascript" type="text/javascript">
function Scrivi() {
document.getElementById("password").innerHTML=document.getElementById("user_password").value;
document.getElementById("mail").innerHTML=document.getElementById("user_email").value;
}
</script>
</head>
<body>
<p> </p>
<form name="form1" action="ProvaReg.php" method="get">
<table border="1" width="357" height="359">
<tr>
<td height="19" width="357" colspan="2">
<p align="center">Sito</td>
</tr>
<tr>
<td height="21" width="127">Nik</td>
<td height="21" width="214">
<input type="text" name="username" id="username" ></td>
</tr>
<tr>
<td height="17" width="127">Pass</td>
<td height="17" width="214">
<input type="text" name="user_password" id="user_password" onchange="Scrivi()"></td>
</tr>
<tr>
<td height="18" width="127">Email</td>
<td height="18" width="214">
<input type="text" name="user_email" id="user_email" onchange="Scrivi()"></td>
</tr>
<tr>
<td height="18" width="341" colspan="2">
<p align="center">Forum</td>
</tr>
<tr>
<td height="18" width="127">Nik</td>
<td height="18" width="214">
Vale Quello sopra:....</td>
</tr>
<tr>
<td height="17" width="127">Pass</td>
<td height="17" width="214">
<input type="text" name="password" id="password"></td>
</tr>
<tr>
<td height="19" width="127">Email</td>
<td height="19" width="214">
<input type="text" name="mail" id="mail"></td>
</tr>
<tr>
<td height="24" width="127">
<p align="left">Icq</td>
<td height="24" width="214">
<input type="text" name="user_icq" id="user_icq"></td>
</tr>
<tr>
<td height="22" width="127">Msn</td>
<td height="22" width="214">
<input type="text" name="user_msnm" id="user_msnm"></td>
</tr>
<tr>
<td height="24" width="341" colspan="2">
<p align="center">
<input type="submit" name="submit" value="Invia" id="submit"></td>
</tr>
<tr>
<td height="59" width="341" colspan="2"> </td>
</tr>
</table>
</form>
</body>
</html>