Persönliche Werkzeuge

Vorlage:SetHTMLContent

Aus BogenWiki

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
 
(Der Versionsvergleich bezieht 12 dazwischenliegende Versionen mit ein.)
Zeile 1: Zeile 1:
<noinclude>
<noinclude>
-
{{BD-Satz-BDZelleInfo|Typ=JS}}
+
(1) <tt><nowiki>{{SetHTMLContent|JS}}</nowiki></tt>
-
Type=InfoSet: "xxx" => "<html><span id="Bg1-S1">xxx</span></html>"
+
{{SetHTMLContent|JS}}
-
{{BD-Satz-BDZelleInfo|Typ=InfoSet|Bg=Bg1|Sp=S1|Info=yyy}}
+
 
-
</noinclude><includeonly>{{#switch:{{{Typ|-}}}
+
(2) <tt><nowiki>{{SetHTMLContent|Bg1-S1|yyy}}</nowiki></tt> <br>
 +
Type=InfoSet: "xxx" => "<html><span id="Bg1-S1">xxx</span></html>" <br>
 +
{{SetHTMLContent|Bg1-S1|yyy}}
 +
 
 +
</noinclude><includeonly>{{#switch:{{{1|-}}}
|JS=<html>
|JS=<html>
<script type="text/javascript">
<script type="text/javascript">
-
function SetBDZelleInfo(Bg,Sp,Info)
+
function SetHTMLContent(ID,HTMLText)
{
{
-
  sCellID = Bg+'-'+Sp;
+
   eCell = document.getElementById(ID);
-
   eCell = document.getElementById(sCellID);
+
   if (eCell) {
   if (eCell) {
-
     eCell.innerHTML = Info;
+
     eCell.innerHTML = HTMLText;
   }
   }
}
}
</script></html>
</script></html>
-
|InfoSet=s<html><script type="text/javascript">SetBDZelleInfo('</html>{{{Bg}}}<html>','</html>{{{Sp}}}<html>','</html>{{{Info}}}<html>');</script></html>s
+
|#DEFAULT=<html><script type="text/javascript">SetHTMLContent('</html>{{{1}}}<html>','</html>{{{2}}}<html>');</script></html>
-
|InfoAdd=a<html><script type="text/javascript">AddBDZelleInfo('</html>{{{Bg}}}<html>','</html>{{{Sp}}}<html>','</html>{{{Info}}}<html>');</script></html>a
+
-
|InfoRep=r<html><script type="text/javascript">ReplaceBDZelleInfo('</html>{{{Bg}}}<html>','</html>{{{Sp}}}<html>','</html>{{{Info}}}<html>');</script></html>r
+
-
|DEFAULT=<span style="color:red">BD-Satz-BDZelleInfo: Typ fehlt oder unbekannt ({{{Typ}}}) !!!</span>
+
}}</includeonly>
}}</includeonly>

Aktuelle Version vom 18:55, 7. Feb. 2022

(1) {{SetHTMLContent|JS}}

(2) {{SetHTMLContent|Bg1-S1|yyy}}
Type=InfoSet: "xxx" => "xxx"