php.de

Zurück   php.de > Webentwicklung > HTML, Usability und Barrierefreiheit

HTML, Usability und Barrierefreiheit Themen rund um Textauszeichnung, Formatierung, Barrierefreiheit und Usability.

Antwort
 
LinkBack Themen-Optionen Thema bewerten
Alt 05.11.2006, 15:28  
Erfahrener Benutzer
 
Registriert seit: 08.03.2005
Beiträge: 476
Plague
Standard IFrame nach innerHTML Befehl nicht mehr editierbar

Hallo,

ich lade mit folgendem JavaScript Befehl einen HTML Text in einen IFrame:
Code:
iView.document.documentElement.innerHTML = document.getElementById('code').value;
Dieser wird auch angezeigt. Allerdings kann ich den IFrame (der als WYSIWYG Editor dient) nicht mehr bearbeiten.

Den WYSIWYG Editor starte ich so:
Code:
function Init() { 
iView.document.designMode = 'On'; 
inprintx();
}

function simpleFormate(form, spez){
if(spez==''){ 
spez = null; 
}
iView.document.execCommand(form, false, spez);
}
Ohne den innerHTML Befehl funktioniert alles sehr gut... Aber ich brauche den text in dem IFrame...

Wie kann ich das ändern?

Danke und Gruß
Thomas
Plague ist offline   Mit Zitat antworten
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 05.11.2006, 15:32  
Erfahrener Benutzer
 
Registriert seit: 05.07.2004
Beiträge: 1.476
DiBo33
Standard

Es gibt massenweise WYSIWYG-Editoren, wenn du schon deinen eigenen schreiben möchtest, warum nimmst du dir nicht einen als Vorlage.
DiBo33 ist offline   Mit Zitat antworten
Alt 05.11.2006, 15:36  
Erfahrener Benutzer
 
Registriert seit: 08.03.2005
Beiträge: 476
Plague
Standard

der WYSIWYG-Editor funktioniert wunderbar. Mir geht es nur um das Laden eines HTML-Textes, der bei mir aus einer Datenbank kommt.

Ich nehme an, dass das eh nur ein kleiner Befehl ist, der die Sache "entsperrt"...
Plague ist offline   Mit Zitat antworten
Alt 05.11.2006, 15:44  
Erfahrener Benutzer
 
Registriert seit: 05.07.2004
Beiträge: 1.476
DiBo33
Standard

Kommt auf die Arbeitsweise deines Editors an.

Beim IE könntest du es mit DokumentHTML versuchen.

innerHTML ersetzt eben nicht den Dokument-Baum korrekt.
DiBo33 ist offline   Mit Zitat antworten
Alt 05.11.2006, 15:58  
Erfahrener Benutzer
 
Registriert seit: 08.03.2005
Beiträge: 476
Plague
Standard

DokumentHTML und auch DocumentHTML kennt weder der IE noch der Firefox...
Plague ist offline   Mit Zitat antworten
Alt 05.11.2006, 16:31  
Erfahrener Benutzer
 
Registriert seit: 05.07.2004
Beiträge: 1.476
DiBo33
Standard

DocumentHTML

Zitat:
Some applications do not store documents as files. For example, they might be stored in a database or might require custom server logic to be read and written. In these types of applications, you need to be able to load and save a document as a text string. This facility is provided via the DocumentHTML property, which contains a string representing the document as an HTML document. The DocumentHTML property contains not only the <BODY> portion of the document that the user can edit directly, but the HEAD portion as well, and all the tags required to make the document well-formed, such as <HTML> and </HTML>. The property is read/write; any change made to the string in DocumentHTML is made immediately in the control and vice versa.

A typical scenario is an application that stores documents in a database. The application can use database access commands to read a string out of the database containing the HTML document. The application can then set the DocumentHTML property to this string and allow the user to edit the document in the control. When the user saves the document, the application can get the contents of the DocumentHTML property and write it as a string back to the database.

A Web-based application might follow a similar strategy. The document could be loaded either by downloading a string from the Web, or more directly using the LoadURL method. When the user saves the document, the contents of the DocumentHTML property can be submitted to the server, where a server-based process can then write the string to a file or to a database, as appropriate.
http://msdn.microsoft.com/archive/de...html/cncpt.asp

Beim Firefox musst du in der Doku schauen
DiBo33 ist offline   Mit Zitat antworten
Antwort


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
JavaScript: IFrame: Wert aendern: Problem SvenLittkowski HTML, Usability und Barrierefreiheit 2 26.09.2007 00:49
Kommunikation zwischen IFRAME und Hauptseite R4v3r HTML, Usability und Barrierefreiheit 1 02.04.2007 13:57
iframe erkennen ? simsalabim PHP Tipps 2007 13 23.03.2007 20:30
iframe ein- und ausblenden HTML, Usability und Barrierefreiheit 5 10.03.2006 02:20
Gesamte Seite aus iFrame neu laden HTML, Usability und Barrierefreiheit 5 22.11.2005 17:09
PHP statt iframe PHP Tipps 2007 1 20.11.2005 11:28
Warning: filesize(): SAFE MODE Restriction in effect. nicobischof PHP Tipps 2005-2 9 17.08.2005 19:05
[Erledigt] include Befehl! PHP Tipps 2005-2 0 05.08.2005 10:02
include Befehl! PHP Tipps 2005-2 0 05.08.2005 10:02
[Erledigt] include Befehl! PHP Tipps 2005-2 0 05.08.2005 10:01
[Erledigt] IFrame Höhe dynamisch an Seiteninhalt anpassen? HTML, Usability und Barrierefreiheit 2 23.04.2005 18:44
Hauptseite aus einer in einem iframe liegenden Form neuladen woods HTML, Usability und Barrierefreiheit 3 15.03.2005 11:26
Befehl erst nach Bestimmter Zeit ausführen? PHP Tipps 2005 21 28.02.2005 00:13
[Erledigt] Iframe JavaScript ? HTML, Usability und Barrierefreiheit 5 19.10.2004 21:21
[Erledigt] iframe nach Formulareingaben an neue Grösse anpassen HTML, Usability und Barrierefreiheit 2 17.06.2004 16:25

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
iframe befehle, iframe innerhtml, iframe befehl, html befehle iframe, iframe editierbar, javascript iframe innerhtml, editierbarer iframe, html befehl iframe, innerhtml iframe, befehl innerhtml, iframe editierbar machen, html-befehl gehe zu, document.documentelement.innerhtml =, befehl iframe, html iframe to string, javascript editierbarer iframe, was bewirkt die innerhtml anweisung, innerhtml form iframe, javascript befehle document innerhtml, javascript innerhtml iview

Alle Zeitangaben in WEZ +2. Es ist jetzt 02:44 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.