Suche im Forum:
Suchen


« Vorheriges Thema anzeigen :: Nächstes Thema anzeigen »  
Autor Nachricht
Beitrag03.03.2007 um 15:17 (UTC)    
Titel: probleme mit Javascript Code

ich will text ein bzw. ausblenden habe da so code nur wenn ich`s mehrmals anwenden möchte öffnet sich immer nur s erste text!!
Question
hier mal de code bzw was ich da rein geschrieben habe:
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" width="80%" align="center" border="0" class="tab24">
<tbody>
<tr bgcolor="#808080">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" width="33%" height="35">&nbsp;</td>
<td align="center" width="34%"><span style="FONT-WEIGHT: bold"><font face="Tahoma">sexuell erregt</font></span></td>
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" align="right" width="33%"><a id="swaplink" onfocus="this.blur()" onclick="javascript:swap('Einblenden','Ausblenden', 'swaplink',
'hideme')" href="#swap">Einblenden</a></td>
</tr>
<tr style="FONT-WEIGHT: normal; FONT-SIZE: 16px; BACKGROUND-COLOR: rgb(255,228,122); TEXT-ALIGN: justify">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" colspan="3">
<div id="hideme" style="DISPLAY: none"><br />
<span class="title24">
<div align="center">finanzielle Bed&uuml;rfnisse </div>
</span>
<p>text bla bla bla</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>
<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" width="80%" align="center" border="0" class="tab24">
<tbody>
<tr bgcolor="#ffcc00">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" width="33%" height="35">&nbsp;</td>
<td align="center" width="34%">Freundin</td>
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" align="right" width="33%"><a id="swaplink" onfocus="this.blur()" onclick="javascript:swap('Einblenden','Ausblenden', 'swaplink',
'hideme')" href="#swap">Einblenden</a></td>
</tr>
<tr style="FONT-WEIGHT: normal; FONT-SIZE: 16px; BACKGROUND-COLOR: rgb(255,228,122); TEXT-ALIGN: justify">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" colspan="3">
<div id="hideme" style="DISPLAY: none"><br />
<span class="title24">
<div align="center">Freundin</div>
</span>
<p>text bla bla bla</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>

mfg aliter.de.tl


Zuletzt bearbeitet von aliter am 05.03.2007, 06:19, insgesamt einmal bearbeitet
Beitrag03.03.2007 um 15:29 (UTC)    
Titel:

Nimm mal so:

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" width="80%" align="center" border="0" class="tab24">
<tbody>
<tr bgcolor="#808080">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" width="33%" height="35">&nbsp;</td>
<td align="center" width="34%"><span style="FONT-WEIGHT: bold"><font face="Tahoma">sexuell erregt</font></span></td>
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" align="right" width="33%"><a id="swaplink" onfocus="this.blur()" onclick="javascript:swap('Einblenden','Ausblenden', 'swaplink',
'hideme')" href="#swap">Einblenden</a></td>
</tr>
<tr style="FONT-WEIGHT: normal; FONT-SIZE: 16px; BACKGROUND-COLOR: rgb(255,228,122); TEXT-ALIGN: justify">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" colspan="3">
<div id="hideme" style="DISPLAY: none"><br />
<span class="title24">
<div align="center">finanzielle Bed&uuml;rfnisse </div>
</span>
<p>text bla bla bla</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>
<br />
<script>
function swap2(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" width="80%" align="center" border="0" class="tab24">
<tbody>
<tr bgcolor="#808080">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" width="33%" height="35">&nbsp;</td>
<td align="center" width="34%"><span style="FONT-WEIGHT: bold"><font face="Tahoma">sexuell erregt</font></span></td>
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" align="right" width="33%"><a id="swaplink2" onfocus="this.blur()" onclick="javascript:swap2('Einblenden','Ausblenden', 'swaplink2',
'hideme2')" href="#swap2">Einblenden</a></td>
</tr>
<tr style="FONT-WEIGHT: normal; FONT-SIZE: 16px; BACKGROUND-COLOR: rgb(255,228,122); TEXT-ALIGN: justify">
<td style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px" colspan="3">
<div id="hideme2" style="DISPLAY: none"><br />
<span class="title24">
<div align="center">finanzielle Bed&uuml;rfnisse </div>
</span>
<p>text bla bla bla</p>
<p>&nbsp;</p>
</div>
</td>
</tr>
</tbody>
</table>



Leider kann ich es nicht erklären Laughing

Ich habe die Funktion

swap in swap2

umbenannt und die Punkte

- swaplink in swaplink2
- hideme in hideme2
Beitrag03.03.2007 um 16:03 (UTC)    
Titel:

alles klar !!! danke danke Very Happy
Beitrag05.03.2007 um 05:18 (UTC)    
Titel:

Gern geschehen Wink
Ich hoffe, Du kommst jetzt dahinter
Beiträge der letzten Zeit anzeigen:   


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