AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Kein Valides HTML obwohl valides html
Thema durchsuchen
Ansicht
Themen-Optionen

Kein Valides HTML obwohl valides html

Ein Thema von Meflin · begonnen am 26. Apr 2004 · letzter Beitrag vom 26. Apr 2004
Antwort Antwort
Benutzerbild von Meflin
Meflin

Registriert seit: 21. Aug 2003
4.856 Beiträge
 
#1

Kein Valides HTML obwohl valides html

  Alt 26. Apr 2004, 17:18
Hi,
das ist ein js und wird vom w3c parser fälschlicherweise als falsches html ausgegeben:
Code:
function ToolTip(layerName, TTitel, TInhalt)
{
   ContentInfo = '<table border="0" width="150" cellspacing="0" cellpadding="0"><tr><td width="100%" bgcolor="#000000"><table border="0" width="100%" cellspacing="1" cellpadding="0"><tr><td width="100%" bgcolor='+TitelFarbe+'><table border="0" width="90%" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%"><font class="ToolTipTitel"> '+TTitel+'</font></td></tr></table></td></tr><tr><td width="100%" bgcolor='+TextFarbe+'><table border="0" width="90%" cellpadding="0" cellspacing="1" align="center"><tr><td width="100%"><font class="ToolTipInhalt">'+TInhalt+'</font></td></tr></table></td></tr></table></td></tr></table>';
   InhaltErsetzen(layerName);
}
vermutlich weil der string unterbrochen ist. hat jemand ne idee wie ich das verhindern könnte? lebendes beispiel: meine webseite http://www.acira.net

*MFG*
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.164 Beiträge
 
Delphi 12 Athens
 
#2

Re: Kein Valides HTML obwohl valides html

  Alt 26. Apr 2004, 17:35
zuerst wird im JS-String nicht '/', oder '\' geschrieben, sondern '\/' und '\\'

und dann hat der W3C-Parser einige Macken

Code:
function ToolTip(layerName, TTitel, TInhalt)

   ContentInfo = '<table border="0" width="150" cellspacing="0" cellpadding="0"><tr><td width="100%" bgcolor="#000000"><table border="0" width="100%" cellspacing="1" cellpadding="0"><tr><td width="100%" bgcolor='+TitelFarbe+'><table border="0" width="90%" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%"><font class="ToolTipTitel"> '+TTitel+'<\/font><\/td><\/tr><\/table><\/td><\/tr><tr><td width="100%" bgcolor='+TextFarbe+'><table border="0" width="90%" cellpadding="0" cellspacing="1" align="center"><tr><td width="100%"><font class="ToolTipInhalt">'+TInhalt+'<\/font><\/td><\/tr><\/table><\/td><\/tr><\/table><\/td><\/tr><\/table>';
   InhaltErsetzen(layerName);
und wenn das immernoch nicht durchgeht, dann mußt du noch die Taganfänge splitten
Code:
'<tag ...>'  in   '<'+'tag ...>'
Code:
function ToolTip(layerName, TTitel, TInhalt)

   ContentInfo = '<'+'table border="0" width="150" cellspacing="0" cellpadding="0"><'+'tr><'+'td width="100%" bgcolor="#000000"><'+'table border="0" width="100%" cellspacing="1"
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat
Benutzerbild von Meflin
Meflin

Registriert seit: 21. Aug 2003
4.856 Beiträge
 
#3

Re: Kein Valides HTML obwohl valides html

  Alt 26. Apr 2004, 18:34
thx, that has solved the problem
  Mit Zitat antworten Zitat
Antwort Antwort


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 aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:54 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz