HTML/PHP/AJAX/JS - Nowe Tabele
gutai - 15-05-2009, 13:41 Temat postu: Nowe Tabele Witam zrobiłem nowe tabele sobie w overal_header tak aby jak sie kliknie to żeby sie chowało ale mam pare błedów pomożecie mi je przechwycić ??
1.bład gdy nacisne aby sie schowało wogóle znika całe forum oprócz topu czyli to co jest nad kodem i nie da sie tego przywrócić
2. Pod Cellpiciem robi mi sie niepotrzebny dostęp
mój Kod
Cytat: | </table>
<br>
<!--Serwery -->
<div id="hm" style="position: relative;">
<table width="100%" class="forumline" cellspacing="1" cellpadding="0" border="0" align="center">
<tr>
<th class="thCornerL" height="25" nowrap="nowrap" onclick="javascript:ShowHide('hm','hm2','hm3');" style="cursor: pointer" title="Ukryj">
Serwery
</th>
</tr>
<tr>
<td class="row1">
<span class="gen"><table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tbody>
<tr>
<td class="row2" align="center" width="250"><b>Nazwa Serwera</b></td>
<td class="row2" align="center" width="210"><b>IP</b></td>
<td class="row2" align="center" width="100"><b>Rodzaj</b></td>
<td class="row2" align="center"><b>Status</b></td>
<td class="row2" align="center"><b>Połącz</b></td>
</tr>
<!--TeamSpeak -->
<tr>
<td class="row1" align="center"><b><font color="#1a60c1">ZaStrzel.PL [TeamSpeak]</b></font></td>
<td class="row1" align="center"><font color="#f41717"><b>91.204.161.235:8725</b></font></td>
<td class="row1" align="center"><b>Głosowy</b></td>
<td class="row1" align="center"><a href="http://www.gametracker.com/server_info/91.204.161.235:8725/" target="_blank"><img src="http://cache.www.gametracker.com/server_info/91.204.161.235:8725/b_350x20_C125382-0F3975-FFFFFF-000000.png" border="0" width="350" height="20" /></a></td>
<td class="row1" align="center"><a href="teamspeak://91.204.161.235:8725"><img src="status/ts.png" border="0"></a></td>
</tr>
<!--Koniec Serwerów -->
<!--Sponsorzy -->
<div id="hmZ" style="POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tbody>
<tr>
<th class="thCornerL" title="Ukryj" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">
Sponsorzy
</th>
</tr>
<table width="100%" class="forumline" cellspacing="1" cellpadding="1" border="0" align="center">
<!-- BANERY -->
<td class="row2" align="center"><a href="http://activehosting.pl" target="_blank"><img src="http://img140.imageshack.us/img140/8662/banner1nk0.png" width="468" height="60" border="0" alt="Serwery gier multiplayer"></a></td>
</tr>
<!-- Koniec Banerow -->
<br><br> |
joli - 15-05-2009, 14:04
Totalnie to skopane jest
serwery:
Kod: | <!--Serwery -->
<div id="hmZ" style="POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" title="{L_VHIDE}" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Serwery</th>
</tr></table>
<table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center" width="250"><b>Nazwa Serwera</b></td>
<td class="row2" align="center" width="210"><b>IP</b></td>
<td class="row2" align="center" width="100"><b>Rodzaj</b></td>
<td class="row2" align="center"><b>Status</b></td>
<td class="row2" align="center"><b>Połącz</b></td>
</tr>
<!--TeamSpeak -->
<tr>
<td class="row1" align="center"><b><font color="#1a60c1">ZaStrzel.PL [TeamSpeak]</b></font></td>
<td class="row1" align="center"><font color="#f41717"><b>91.204.161.235:8725</b></font></td>
<td class="row1" align="center"><b>Głosowy</b></td>
<td class="row1" align="center"><a href="http://www.gametracker.com/server_info/91.204.161.235:8725/" target="_blank"><img src="http://cache.www.gametracker.com/server_info/91.204.161.235:8725/b_350x20_C125382-0F3975-FFFFFF-000000.png" border="0" width="350" height="20" /></a></td>
<td class="row1" align="center"><a href="teamspeak://91.204.161.235:8725"><img src="status/ts.png" border="0"></a></td>
</tr></table>
</div>
<div id="hmZ2" style="DISPLAY: none; POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Serwery</th>
</tr>
</table>
</div>
<br>
<script language="javascript" type="text/javascript">
<!--
if(GetCookie('hmZ3') == '2') ShowHide('hmZ', 'hmZ2', 'hmZ3');
//-->
</script>
<!--Koniec Serwerów --> | to prawidlowy poczatek
sponsorzy i banery tez maja sie chowac, same dla siebie?
gutai - 15-05-2009, 14:14
Sponsory i serwery i tak też mają sie chować odzielnie
joli - 15-05-2009, 14:26
No to musza miec oddzielny kod, analogiczny do powyzszego. Pozmieniaj w nim napisy: Serwery (x2) na sponsorzy, w nastepnym kodzie na bannery.
Wewnatrz kodu masz:
Kod: | <table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center" width="250"><b>Nazwa Serwera</b></td>
<td class="row2" align="center" width="210"><b>IP</b></td>
<td class="row2" align="center" width="100"><b>Rodzaj</b></td>
<td class="row2" align="center"><b>Status</b></td>
<td class="row2" align="center"><b>Połącz</b></td>
</tr>
<!--TeamSpeak -->
<tr>
<td class="row1" align="center"><b><font color="#1a60c1">ZaStrzel.PL [TeamSpeak]</b></font></td>
<td class="row1" align="center"><font color="#f41717"><b>91.204.161.235:8725</b></font></td>
<td class="row1" align="center"><b>Głosowy</b></td>
<td class="row1" align="center"><a href="http://www.gametracker.com/server_info/91.204.161.235:8725/" target="_blank"><img src="http://cache.www.gametracker.com/server_info/91.204.161.235:8725/b_350x20_C125382-0F3975-FFFFFF-000000.png" border="0" width="350" height="20" /></a></td>
<td class="row1" align="center"><a href="teamspeak://91.204.161.235:8725"><img src="status/ts.png" border="0"></a></td>
</tr></table> |
zamiast tego dla sponsorow wstaw:
Kod: | <table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td> cos tam, albo wiecej komorek, nie wiem, co chcesz tam miec</td>
</tr></table> |
i analogicznie dla banerow:
Kod: | <table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center"><a href="http://activehosting.pl" target="_blank"><img src="http://img140.imageshack.us/img140/8662/banner1nk0.png" width="468" height="60" border="0" alt="Serwery gier multiplayer"></a></td>
</tr></table> |
gutai - 15-05-2009, 14:30
o tak ??
Kod: | <!--Sponsorzy -->
<div id="hmZ" style="POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" title="{L_VHIDE}" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Sponsorzy </th>
</tr></table>
<table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center"><a href="http://activehosting.pl" target="_blank"><img src="http://img140.imageshack.us/img140/8662/banner1nk0.png" width="468" height="60" border="0" alt="Serwery gier multiplayer"></a></td>
</tr></table>
</div>
<div id="hmZ2" style="DISPLAY: none; POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Sponsorzy</th>
</tr>
</table>
</div>
<br>
<script language="javascript" type="text/javascript">
<!--
if(GetCookie('hmZ3') == '2') ShowHide('hmZ', 'hmZ2', 'hmZ3');
//-->
</script>
<!--Koniec Sponsorzy --> |
joli - 15-05-2009, 14:32
tak
gutai - 15-05-2009, 14:38
Dziekuje ci bardzo za pomoc :*
ale jest bład gdy kilkam na serwery to chowaja sie serwery gdy klikam na sponsorzy to chowaja sie serwery ^^
cały kod
Kod: | <!--Serwery -->
<div id="hmZ" style="POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" title="{L_VHIDE}" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Serwery</th>
</tr></table>
<table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center" width="250"><b>Nazwa Serwera</b></td>
<td class="row2" align="center" width="210"><b>IP</b></td>
<td class="row2" align="center" width="100"><b>Rodzaj</b></td>
<td class="row2" align="center"><b>Status</b></td>
<td class="row2" align="center"><b>Polacz</b></td>
</tr>
<!--TeamSpeak -->
<tr>
<td class="row1" align="center"><b><font color="#1a60c1">ZaStrzel.PL [TeamSpeak]</b></font></td>
<td class="row1" align="center"><font color="#fb9402"><b>91.204.161.235:8725</b></font></td>
<td class="row1" align="center"><b>Głosowy</b></td>
<td class="row1" align="center"><a href="http://www.gametracker.com/server_info/91.204.161.235:8725/" target="_blank"><img src="http://cache.www.gametracker.com/server_info/91.204.161.235:8725/b_350x20_C125382-0F3975-FFFFFF-000000.png" border="0" width="350" height="20" /></a></td>
<td class="row1" align="center"><a href="teamspeak://91.204.161.235:8725"><img src="status/ts.png" border="0"></a></td>
</tr></table>
</div>
<div id="hmZ2" style="DISPLAY: none; POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Serwery</th>
</tr>
</table>
</div>
<br>
<script language="javascript" type="text/javascript">
<!--
if(GetCookie('hmZ3') == '2') ShowHide('hmZ', 'hmZ2', 'hmZ3');
//-->
</script>
<!--Koniec Serwerów -->
<!--Sponsorzy -->
<div id="hmZ" style="POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" title="{L_VHIDE}" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Sponsorzy </th>
</tr></table>
<table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center"><a href="http://activehosting.pl" target="_blank"><img src="http://img140.imageshack.us/img140/8662/banner1nk0.png" width="468" height="60" border="0" alt="Serwery gier multiplayer"></a></td>
</tr></table>
</div>
<div id="hmZ2" style="DISPLAY: none; POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Sponsorzy</th>
</tr>
</table>
</div>
<br>
<script language="javascript" type="text/javascript">
<!--
if(GetCookie('hmZ3') == '2') ShowHide('hmZ', 'hmZ2', 'hmZ3');
//-->
</script>
<!--Koniec Sponsorzy --> |
Anonymous - 15-05-2009, 16:10
Na div ?
Jesli zechcesz to prosze to jest kod bezposrednio dla tabel :
To jest link wywolujacy akcje ukrycia lub pokazania tabeli :
Kod: | <a href="javascript:ShowOrHide('specjal_1')">Nazwa_linka</a> |
Tak oznaczasz tabele do schowania lub pokazania :
Kod: | <table id='specjal_1' style='display:none'><tr><td> |
Przy czym display moze przyjac none lub yes, schowana lub pokazana przy pierwszym
zaladowaniu sie strony. Innymi slowy mowiac mozesz okreslic czy tabela
po zaladowaniu strony ma byc odrazu widoczna czy ma byc schowana.
Mozesz tez chowac i pokazywac kilka tabel jednoczesnie lub na przemian.
W tym ostatnim wypadku na poczatku okreslasz ktore maja byc schowane, a ktore
pokazane. Wystarczy ze w jednym linku dodasz dwa odnosniki jednoczesnie i
ta ktora byla schowana pokaze sie i na odwrot.
Linka tobisz wtedy tak :
Kod: | <a href="javascript:ShowOrHide('specjal_1,specjal_2')">Nazwa_linka</a> |
I juz tabela specjal_1 i tabela specjal_2 bedzie odpowiednio reagowac.
Skrypt java dodajesz na strone tak :
Kod: | <script language="JavaScript" type="text/javascript" src="sciezka_do_skryptu/tablepokazschowaj.js"></script> |
w sekcji HEAD.
A tu masz spakowany skrypt :
ftp://87.206.122.127/tablepokazschowaj.zip
Tutaj mozesz sobie zobaczyc jak to funkcjonuje :
www.emulek.com.pl w tabeli po prawej "najnowsze".
Kliknij sobie w kolejne dni. To jest chyba jedyne miejsce gdzie sie mozna tym
pobawic bez logowania.
joli - 15-05-2009, 16:42
gutai, bo masz powtorzone kody. Powinno byc:
Kod: | <!--Serwery -->
<div id="hmZ" style="POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" title="{L_VHIDE}" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Serwery</th>
</tr></table>
<table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center" width="250"><b>Nazwa Serwera</b></td>
<td class="row2" align="center" width="210"><b>IP</b></td>
<td class="row2" align="center" width="100"><b>Rodzaj</b></td>
<td class="row2" align="center"><b>Status</b></td>
<td class="row2" align="center"><b>Polacz</b></td>
</tr>
<!--TeamSpeak -->
<tr>
<td class="row1" align="center"><b><font color="#1a60c1">ZaStrzel.PL [TeamSpeak]</b></font></td>
<td class="row1" align="center"><font color="#fb9402"><b>91.204.161.235:8725</b></font></td>
<td class="row1" align="center"><b>Głosowy</b></td>
<td class="row1" align="center"><a href="http://www.gametracker.com/server_info/91.204.161.235:8725/" target="_blank"><img src="http://cache.www.gametracker.com/server_info/91.204.161.235:8725/b_350x20_C125382-0F3975-FFFFFF-000000.png" border="0" width="350" height="20" /></a></td>
<td class="row1" align="center"><a href="teamspeak://91.204.161.235:8725"><img src="status/ts.png" border="0"></a></td>
</tr></table>
</div>
<div id="hmZ2" style="DISPLAY: none; POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" style="CURSOR: pointer" onclick="javascript:ShowHide('hmZ','hmZ2','hmZ3');" nowrap="nowrap" height="25">Serwery</th>
</tr>
</table>
</div>
<br>
<script language="javascript" type="text/javascript">
<!--
if(GetCookie('hmZ3') == '2') ShowHide('hmZ', 'hmZ2', 'hmZ3');
//-->
</script>
<!--Koniec Serwerów -->
<!--Sponsorzy -->
<div id="hmD" style="POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" title="{L_VHIDE}" style="CURSOR: pointer" onclick="javascript:ShowHide('hmD','hmD2','hmD3');" nowrap="nowrap" height="25">Sponsorzy </th>
</tr></table>
<table rules="none" width="100%" cellspacing="0" cellpadding="1" border="0">
<tr>
<td class="row2" align="center"><a href="http://activehosting.pl" target="_blank"><img src="http://img140.imageshack.us/img140/8662/banner1nk0.png" width="468" height="60" border="0" alt="Serwery gier multiplayer"></a></td>
</tr></table>
</div>
<div id="hmD2" style="DISPLAY: none; POSITION: relative">
<br>
<table class="forumline" cellspacing="1" cellpadding="3" width="100%" align="center" border="0">
<tr>
<th class="thCornerL" style="CURSOR: pointer" onclick="javascript:ShowHide('hmD','hmD2','hmD3');" nowrap="nowrap" height="25">Sponsorzy</th>
</tr>
</table>
</div>
<br>
<script language="javascript" type="text/javascript">
<!--
if(GetCookie('hmD3') == '2') ShowHide('hmD', 'hmD2', 'hmD3');
//-->
</script>
<!--Koniec Sponsorzy --> |
gutai - 15-05-2009, 17:19
Dzięki Joli temat można zamknąć
|
|
|