![]() |
![]() |
|
![]() |
![]() |
|
Programmierung Rat & Tat für Programmierer |
![]() |
|
Themen-Optionen | Ansicht |
![]() |
#11 |
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
![]() 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) |
![]() |
![]() |
![]() |
#12 |
Inventar
![]() |
![]() ![]() |
![]() |
![]() |
![]() |
#13 | |
Inventar
![]() |
![]() Zitat:
![]() |
|
![]() |
![]() |
![]() |
#14 |
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
![]() Wie?
Jak
____________________________________
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) |
![]() |
![]() |
![]() |
#15 |
Inventar
![]() |
![]() ![]() ![]() @ jak übergib gleich das ganze formular mit allen feldern <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function displayHTML(form) { var inf = form.htmlArea.value; win = window.open(", ", 'popup', 'toolbar = no, status = no'); win.document.write("" + inf + ""); } // End --> </script> </HEAD> <BODY> <form> <textarea name="htmlArea" cols=45 rows=6> </textarea> <input type="button" value=" anzeigen " onclick="displayHTML(this.form)"> </form> <center> |
![]() |
![]() |
![]() |
#16 | |
Elite
![]() Registriert seit: 08.11.2001
Alter: 42
Beiträge: 1.285
|
![]() @jak:
Zitat:
<form id="formular"> <textarea id="textfeld"></textarea> <input type="submit"> </form> und auslesen über: document.formular.textfeld.value mfg c.
____________________________________
www.sagmueller.net Freedom - use it or lose it (Lawrence Lessig) Im übrigen bin ich der Meinung, dass Microsoft zerschlagen werden muss. |
|
![]() |
![]() |
![]() |
#17 |
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
![]() Ist mir sehr peinlich. Ich habs immer mit .text versucht, weil ich das so von Delphi gewöhnt bin. Bin aber eh noch selber draufgekommen.
Jak
____________________________________
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) |
![]() |
![]() |
![]() |
#18 | |
Elite
![]() Registriert seit: 08.11.2001
Alter: 42
Beiträge: 1.285
|
![]() Zitat:
![]()
____________________________________
www.sagmueller.net Freedom - use it or lose it (Lawrence Lessig) Im übrigen bin ich der Meinung, dass Microsoft zerschlagen werden muss. |
|
![]() |
![]() |
![]() |
#19 |
Inventar
![]() |
![]() ![]() ![]() ![]() ...würd ja alles subba funzen, wenn da nicht die <option>blabla text</option></select> die übernimmt das jscript nicht ![]() var sis1 = form.sis1.value; und dann mit win.document.write("gültig ab : " + sis1 +""); in das neue fenster schreiben ![]() |
![]() |
![]() |
![]() |
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|