Hallo Typo3-Gemeinde,
ich habe folgendes Problem:
in einer Extensionen wird der Variable $strIframe ein String zugewiesen. Dieser String enthält Javascriptcode, der dementsprechend auch (") Anführungszeichen enthält. Jetzt habe ich das Problem, das er in einem Codeteil plötzlich & quot; statt " schreibt.
Das & quot habe ich hier im Beispiel mit Leerzeichen geschrieben, da der Browser dieses sonst umwandelt.
Quelltext (Auszug):
$strIframe.='
<style type="text/css">
var psrc;
psrc = "<div id=\'progressbar\' style=\'width:500px;\'>";
psrc = psrc + \"<div style=\'float:left;padding: 2 2 2 2px; height: 17px; width:\" + pAll + \"px; background-color:\" + bcolor + \";\'>\";
etc. kommt folgendes im Browser an
var psrc;
psrc = "<div id="progressbar" style="width:500px;">";
psrc = psrc + \"<div style="float:left;padding: 2 2 2 2px; height: 17px; width:\ & quot;+ pAll + \ & quot;px; background-color:\ & quot; + bcolor + \& quot;;">\";
Habe schon mehrer Möglichkeiten Probiert, aber bis jetzt keine Brauchbare gefunden
verwende ich den originalcode
psrc = "<div id=progressbar style=\"width:500px;\">";
psrc = psrc + "<div style=\'float:left;padding: 2 2 2 2px; height: 17px; width:" + pAll + "px; background-color:" + bcolor + ";\'>";
if(p>0) psrc = psrc + "<div style=\'padding: 1 1 1 1px; width:" + pa + "px; background-color:" + fcolorcell + ";\'> </div>";
kommt folgendes im Browser an
psrc = "<div id="progressbar" style="\" width:500px="">";
psrc = psrc + "<div style="float:left;padding: 2 2 2 2px; height: 17px; width:& quot; + pAll + & quot;px; background-color:& quot; + bcolor + & quot;;">";
Das Problem tritt aber nur auf einem Mittwald Server auf, auf anderen Servern läuft das alles normal.
Grüße
Nico Kaiser