Suche im Forum:
Suchen


Autor Nachricht
Beitrag28.08.2010 um 10:06 (UTC)    
Titel: [erledigt] Problem mit Code

Hallo,

ich habe von einer html-Seite diesen Code verändert in meine Seite eingefügt (ja, ich darf den Code kopieren Wink):

Zitat:
<style type="text/css">
.tab24{color:black; font-size:22px; font-family:verdana, arial;
}
.tab24 a:active{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:link{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:visited{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:hover{color:#000;font-size:18px; font-family:verdana, arial; text-decoration:none;
}
.title24{color:#000;font-size:20px; font-family:verdana, arial;font-weight:normal;
}
</style> <script>
function swap(openlink,closelink, linkid, dataid)
{
if( document.getElementById(dataid).style.display == 'none')
{
document.getElementById(dataid).style.display='inline';
document.getElementById(linkid).firstChild.nodeValue=closelink;
} else
{
document.getElementById(dataid).style.display='none';
document.getElementById(linkid).firstChild.nodeValue=openlink;
}
}
</script>
<table cellspacing="0" cellpadding="0" border="0" align="center" width="80%" class="tab24">
<tbody>
<tr bgcolor="#ffcc00">
<td height="35" width="33%" style="padding-left: 15px; padding-right: 15px;">&nbsp;</td>
<td align="center" width="34%">Test</td>
<td align="right" width="33%" style="padding-left: 15px; padding-right: 15px;"><a href="#swap"
onclick="javascript:swap('Anzeigen','Verstecken', 'swaplink',
'hideme')" id="swaplink" onfocus="this.blur()">Anzeigen</a></td>
</tr>
<tr style="text-align: justify; font-size: 16px; font-weight: normal; background-color: rgb(255, 228, 122);">
<td colspan="3" style="padding-left: 15px; padding-right: 15px;">
<div id="hideme" style="display: none;"><br />
<span class="title24">
<div align="center">Test</div>
</span>
<p>Hallo Dies ist ein Test. Danke</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>
<br />
<br />
<style type="text/css">
.tab24{color:black; font-size:22px; font-family:verdana, arial;
}
.tab24 a:active{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:link{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:visited{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:hover{color:#000;font-size:18px; font-family:verdana, arial; text-decoration:none;
}
.title24{color:#000;font-size:20px; font-family:verdana, arial;font-weight:normal;
}
</style> <script>
function swap(openlink,closelink, linkid, dataid)
{
if( document.getElementById(dataid).style.display == 'none')
{
document.getElementById(dataid).style.display='inline';
document.getElementById(linkid).firstChild.nodeValue=closelink;
} else
{
document.getElementById(dataid).style.display='none';
document.getElementById(linkid).firstChild.nodeValue=openlink;
}
}
</script>
<table cellspacing="0" cellpadding="0" border="0" align="center" width="80%" class="tab24">
<tbody>
<tr bgcolor="#ffcc00">
<td height="35" width="33%" style="padding-left: 15px; padding-right: 15px;">&nbsp;</td>
<td align="center" width="34%">Test No. 2</td>
<td align="right" width="33%" style="padding-left: 15px; padding-right: 15px;"><a href="#swap"
onclick="javascript:swap('Anzeigen','Verstecken', 'swaplink',
'hideme')" id="swaplink" onfocus="this.blur()">Anzeigen</a></td>
</tr>
<tr style="text-align: justify; font-size: 16px; font-weight: normal; background-color: rgb(255, 228, 122);">
<td colspan="3" style="padding-left: 15px; padding-right: 15px;">
<div id="hideme" style="display: none;"><br />
<span class="title24">
<div align="center">Test No. 2</div>
</span>
<p>Hallo Dies ist Test No. 2. Danke</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>


Wie ihr vielleicht sehen könnt, habe ich den Code 2 Mal eingefügt und ich
denke, da ist das Problem: Wenn ich das abspeichere, sehe ich das hier:

http://gameznmore.de.tl/TESTS.htm

(klicke auf beide Anzeige-tafeln und dir wird auffallen, dass wenn du das Zweite versuchst zu öffnen, sich das Erste, nicht das Zweite, öffnet)

ich glaube, die Person hat Variablen eingeführt, dass man diese nicht in einem Code dahinter nochmal verwenden kann, wenn man etwas anderes raushaben möchte. Leider kenne ich mich damit nicht so dermaßen aus, also wäre meine Frage:

Ist jemand so nett und kann den kompletten Code so ändern, dass man beide Texte unabhängig vom anderen öffnen und schließen kann?

Vielen vielen Dank!

gamezNmore


Zuletzt bearbeitet von gameznmore am 30.08.2010, 11:14, insgesamt 4-mal bearbeitet
Beitrag28.08.2010 um 14:12 (UTC)    
Titel: RE

Hallo

ja kannst du mir mal die seite sagen von wo du das hast

MFg NeNeGames


Arrow http://elite-gamer-zone.eu.tt
Arrow http://elite-film-zone-eu.tt
Beitrag28.08.2010 um 14:29 (UTC)    
Titel:

Hab mal dein Code überarbeitet die einfachste Methode ist die das man unabhängige Klassen erstellt, das in rot ist das was ich geändert habe!

Zitat:
<style type="text/css">
.tab24{color:black; font-size:22px; font-family:verdana, arial;
}
.tab24 a:active{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:link{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:visited{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:hover{color:#000;font-size:18px; font-family:verdana, arial; text-decoration:none;
}
.title24{color:#000;font-size:20px; font-family:verdana, arial;font-weight:normal;
}
</style> <script>
function swap(openlink,closelink, linkid, dataid)
{
if( document.getElementById(dataid).style.display == 'none')
{
document.getElementById(dataid).style.display='inline';
document.getElementById(linkid).firstChild.nodeValue=closelink;
} else
{
document.getElementById(dataid).style.display='none';
document.getElementById(linkid).firstChild.nodeValue=openlink;
}
}
</script>
<table cellspacing="0" cellpadding="0" border="0" align="center" width="80%" class="tab24">
<tbody>
<tr bgcolor="#ffcc00">
<td height="35" width="33%" style="padding-left: 15px; padding-right: 15px;">&nbsp;</td>
<td align="center" width="34%">Test</td>
<td align="right" width="33%" style="padding-left: 15px; padding-right: 15px;"><a href="#swap"
onclick="javascript:swap('Anzeigen','Verstecken', 'swaplink',
'hideme')" id="swaplink" onfocus="this.blur()">Anzeigen</a></td>
</tr>
<tr style="text-align: justify; font-size: 16px; font-weight: normal; background-color: rgb(255, 228, 122);">
<td colspan="3" style="padding-left: 15px; padding-right: 15px;">
<div id="hideme" style="display: none;"><br />
<span class="title24">
<div align="center">Test</div>
</span>
<p>Hallo Dies ist ein Test. Danke</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>
<br />
<br />
<style type="text/css">
.tab24{color:black; font-size:22px; font-family:verdana, arial;
}
.tab24 a:active{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:link{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:visited{color:#ffffff;font-size:18px;font-family:verdana, arial; text-decoration:none;
}
.tab24 a:hover{color:#000;font-size:18px; font-family:verdana, arial; text-decoration:none;
}
.title24{color:#000;font-size:20px; font-family:verdana, arial;font-weight:normal;
}
</style> <script>
function swap2(openlink2,closelink2, linkid2, dataid2)
{
if( document.getElementById(dataid2).style.display == 'none')
{
document.getElementById(dataid2).style.display='inline';
document.getElementById(linkid2).firstChild.nodeValue=closelink2;
} else
{
document.getElementById(dataid2).style.display='none';
document.getElementById(linkid2).firstChild.nodeValue=openlink2;
}
}
</script>
<table cellspacing="0" cellpadding="0" border="0" align="center" width="80%" class="tab24">
<tbody>
<tr bgcolor="#ffcc00">
<td height="35" width="33%" style="padding-left: 15px; padding-right: 15px;">&nbsp;</td>
<td align="center" width="34%">Test No. 2</td>
<td align="right" width="33%" style="padding-left: 15px; padding-right: 15px;"><a href="#swap2"
onclick="javascript:swap('Anzeigen','Verstecken', 'swaplink2',
'hideme2')" id="swaplink2" onfocus="this.blur()">Anzeigen</a></td>
</tr>
<tr style="text-align: justify; font-size: 16px; font-weight: normal; background-color: rgb(255, 228, 122);">
<td colspan="3" style="padding-left: 15px; padding-right: 15px;">
<div id="hideme2" style="display: none;"><br />
<span class="title24">
<div align="center">Test No. 2</div>
</span>
<p>Hallo Dies ist Test No. 2. Danke</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>


Hoffe konnte dir weiterhelfen! Wink

Mfg Yevgen
______________
.:!!! Denk Immer Positiv !!!:.
Beitrag28.08.2010 um 15:08 (UTC)    
Titel:

woooww, wie geil, danke, da hät ich eigentlich auch selber drauf kommen können, naja, danke jedenfalls, es klappt!

@nenegames: Es war diese Seite: http://benedict-ohnemueller.de/tricks/textspielereien/versteckt.htm

Also danke nochmal, ihr seid echt spitze!

Liebe Grüße,

gamezNmore

EDIT:

Ein klitzekleines Problem gibt es dennoch:

ich habe nun meine ganzen Spiele von Abenteuer in die Dinger reingetan (http://gameznmore.de.tl/Abenteuer.htm)

Das Problem ist jetzt: Die ganzen Links (Überschriften und [mehr...]-Button) werden weiß angezeigt, was ich nicht möchte. Klar, kann ich die Farben anpassen, aber ich möchte lieber, dass die Links schwarz sind und auch wenn man drübergeht schwarz bleiben, wenn ich sie extra mit schwarzer Farbe einfärbe, bleiben sie dennoch weiß.

Weiß da einer Rat?

Vielen Dank!

gamezNmore


Zuletzt bearbeitet von gameznmore am 28.08.2010, 16:47, insgesamt einmal bearbeitet
Beiträge der letzten Zeit anzeigen:   


Powered by phpBB © 2001, 2005 phpBB Group
Deutsche Übersetzung von phpBB.de