Thema: web formulare
Einzelnen Beitrag anzeigen
Alt 06.07.2002, 12:16   #11
jak
Inventar
 
Registriert seit: 13.06.2001
Beiträge: 1.830


Standard

Mit JS geht es so wie es sagi gesagt hat:

<html>
<head>
</head>
<body>
Seite1
<script language="JavaScript">
function seite2_schreiben()
{
document.writeln('<html>');
document.writeln('<head>');
document.writeln('</head>');
document.writeln('<body>');
document.writeln('Seite2');
document.writeln('<form>');
document.writeln('<textarea>');
document.writeln(document.forms[0].elements[0].text);
document.writeln('</textarea>');
document.writeln('</form>');
document.writeln('</body>');
document.writeln('</html>');
}
</script>
<form action="post" onsubmit="javascript:seite2_schreiben()">
<textarea name="textarea_seite1"></textarea>
<input type="submit">
</form>
</body>
</html>

Allerdings bleibt da leider ein Problem:Wie greift man in JS auf den Inhalt eines Textfeldes zu? Im moment liefert es nur undefined zurück.

Jak

edit:code-tag dazugefügt, da er sonst java script statt javascript schreibt
edit2: er schreibts leider immer noch. Also: es heißt in der Zeile <form action="post" onsubmit="javascript:seite2_schreiben()"> "javascript" nicht "java script"
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)
jak ist offline   Mit Zitat antworten