| Autor |
Beitrag |
WeBsPaCe
      
Beiträge: 2322
Erhaltene Danke: 1
FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
|
Verfasst: Fr 13.05.05 15:08
Hallole!
Ich kann ja per JavaScript in meinem HTML-Dokument folgendes machen:
Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19:
| <html>
<head> <title>Test</title> </head>
<body>
<script language="JavaScript"> <!-- self.document.writeln('textextextext'); //--> </script>
<iframe name="ifrl"></iframe>
</body>
</html> |
Jetzt möchte ich den Text jedoch nicht ins "Hauptdokument" reinschreiben, sondern in mein Inline-Frame ifrl reinschreiben.
Kann mir da jemand helfen? Danke schonmal. 
|
|
retnyg
      
Beiträge: 2754
SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
|
Verfasst: Fr 13.05.05 15:26
dieser code kann das gewünschte bewerkstelligen:
Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
| <html><head><title>Test</title> </head><body> <div id="Bereich" style="border:1px black solid; padding:10px"> </div> <script type="text/javascript"> var myH1 = document.createElement("h1"); var myText = document.createTextNode("Eine sehr dynamische Seite"); myH1.appendChild(myText); var Ausgabebereich = document.getElementById("Bereich"); Ausgabebereich.appendChild(myH1); </script> </body></html> |
quelle:
64.233.183.104/searc...te+writeln&hl=de
_________________ es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
|
|
retnyg
      
Beiträge: 2754
SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
|
Verfasst: Fr 13.05.05 15:31
variante b:
Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21:
| <html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Neue Seite 1</title> </head>
<body> <form name="form1"> <iframe name="inline" src=""> </iframe></form> <script language="javascript"> <!-- self.document.inline.document.write('hello world'); //--> </script>
</body>
</html> |
_________________ es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
|
|
WeBsPaCe 
      
Beiträge: 2322
Erhaltene Danke: 1
FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
|
Verfasst: Fr 13.05.05 17:02
Puh... Also... Ich probiere jetzt schon seit ner Dreiviertelstunde an Variante-A rum...  Das ist einfach zu komplex für das, was ich vorhabe. Variante-B wäre genau das, was ich gesucht hätte, aber irgendwie funktioniert das nicht. Ich bekomme nur das Inline-Frame angezeigt. Aber ohne Inhalt.. 
|
|
WeBsPaCe 
      
Beiträge: 2322
Erhaltene Danke: 1
FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
|
Verfasst: Fr 13.05.05 17:08
Berichtigung: Im FireFox 1.0.4 funktioniert Variante-B nicht. Im Internet Explorer sehr wohl... 
|
|
retnyg
      
Beiträge: 2754
SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
|
Verfasst: Fr 13.05.05 17:30
variante c: (hier wird inline als frame behandelt, so gehts auch mit dem fux)
Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22:
| <html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Neue Seite 1</title> <script language="javascript"> function doWrite() { parent.inline.document.write('hello world'); } </script>
</head>
<body onload="javascript:doWrite();"> <iframe name="inline" src="" onshow=""> </iframe> </body>
</html> |
_________________ es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
|
|
WeBsPaCe 
      
Beiträge: 2322
Erhaltene Danke: 1
FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
|
Verfasst: Fr 13.05.05 17:41
Danke, danke, danke!! 
|
|
|