Oki Danke jetzt funzt es und jetzt hab ich das auch verstanden wie man die 2 und 3 und 4 box machen kann so.
Danke @ Lord
Erste Box
<script type="text/javascript">
var Box = 3;
var chosenBox = 1;
function toggleBox (toBox) {
toBox = isNaN(toBox) ? 0 : toBox;
if (toBox < 1 || toBox > Box) {
toBox = (chosenBox < Box) ? chosenBox + 1 : 1;
}
document.getElementById('Box_'+chosenBox).style.display = 'none';
document.getElementById('Box_'+toBox).style.display = '';
chosenBox = toBox;
}
</script>
<?php
defined ('main') or die ('no direct access');
echo'
<div id="Box_1">
<div id="Menu">
<a href="javascript:void(0);" onclick="toggleBox(1);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttonps.png" border="0" alt="Public Server"></a>
<a href="javascript:void(0);" onclick="toggleBox(2);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttonws.png" border="0" alt="War Server"></a>
</div>
<div id="Inhalt">{_boxes_pubserver}</div>
</div>
';
echo '
<div id="Box_2" style="display:none">
<div id="Menu">
<a href="javascript:void(0);" onclick="toggleBox(1);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttonps.png" border="0" alt="Public Server"></a>
<a href="javascript:void(0);" onclick="toggleBox(2);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttonws.png" border="0" alt="War Server"></a>
</div>
<div id="Inhalt">{_boxes_warserver}</div>
</div>
';
?>
Zweite Box
<script type="text/javascript">
var Box{B} = {2};
var chosenBox{B} = 1;
function toggleBox{B} (toBox{B}) {
toBox{B} = isNaN(toBox{{B}) ? 0 : toBox{B};
if (toBox{B} < 1 || toBox{B} > Box{B}) {
toBox{B} = (chosenBox{B} < Box{B}) ? chosenBox{B} + 1 : 1;
}
document.getElementById('Box{B}_'+chosenBox{B}).style.display = 'none';
document.getElementById('Box{B}_'+toBox{B}).style.display = '';
chosenBox{B} = toBox{B};
}
</script>
<?php
defined ('main') or die ('no direct access');
echo'
<div id="Box{B}_1">
<div id="Menu">
<a href="javascript:void(0);" onclick="toggleBox{B}(1);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttont.png" border="0" alt="Toplist"></a>
<a href="javascript:void(0);" onclick="toggleBox{B}(2);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttonp.png" border="0" alt="Partner Sites"></a>
</div>
<div id="Inhalt">{_boxes_allianz3}</div>
</div>
';
echo '
<div id="Box{B}_2" style="display:none">
<div id="Menu">
<a href="javascript:void(0);" onclick="toggleBox{B}(1);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttont.png" border="0" alt="Toplist"></a>
<a href="javascript:void(0);" onclick="toggleBox{B}(2);"><img src="http://www.legend-of-german.de/include/designs/legend_blue/Bilder/buttonp.png" border="0" alt="Partner Sites"></a>
</div>
<div id="Inhalt">{_boxes_allianz}</div>
</div>
';
?>
Das {B} zeigt die änderungen für die 2. Box.
So wie ich das verstanden habe kann man stadt dem B auch A oder sonst für ein Buchstaben nutzen nur halt ohne die {} und ohne Leer Zeichen.
Denke das ist so richtig Lord oder?
Zuletzt modifiziert von Vauxhall am 19.03.2010 - 10:36:43