Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> ukrywanie wielu td
Dex1987
post 10.04.2006, 13:27:04
Post #1





Grupa: Zarejestrowani
Postów: 246
Pomógł: 0
Dołączył: 28.09.2004

Ostrzeżenie: (0%)
-----


Witam,

mam taki kodzik

  1.  
  2. function ShowHide (open, close) {
  3.  
  4.                   if (open != '') {
  5.  
  6.                       expMenu (open);
  7.                   }
  8.  
  9.                   if (close != '') {
  10.  
  11.                       expMenu (close);
  12.                   }
  13. }
  14.  
  15. function expMenu (id) {
  16.  
  17.                  var item = null;
  18.  
  19.                  if (document.getElementById) {
  20.  
  21.                      item = document.getElementById(id);
  22.  
  23.                  } else if (document.all) {
  24.  
  25.                             item = document.all[id];
  26.  
  27.                  } else if (document.layers){
  28.  
  29.                             item = document.layers[id];
  30.                  }
  31.  
  32.                  if (!item) {
  33.  
  34.                      // do nothing
  35.  
  36.                  } else if (item.style) {
  37.  
  38.                             if (item.style.display == "none") {
  39.  
  40.                                 item.style.display = "";
  41.  
  42.                             } else {
  43.  
  44.                                 item.style.display = "none";
  45.                             }
  46.  
  47.                  } else {
  48.  
  49.                             item.visibility = "show";
  50.                  }
  51. }
  52.  
  53.  
  54.      <table border="0" align="center" cellpadding="0" cellspacing="0" width="90%" height="1">
  55.        <tr>
  56.          <td height="25" width="249" valign="top">
  57.            <font face="Verdana" size="2" color="#094AAC">
  58.              <a href="javascript:ShowHide('qr_opena1175','qr_closeda1175');">+ Menu główne</a>
  59.            </font>
  60.          </td>
  61.        </tr>
  62.        <tr id="qr_opena1175" style="display:none;position:relative;">
  63.              <td height="25" style="border-bottom: 1px solid #E8E8E8;" onmouseover="style.backgroundColor='#F9F9F9';" onmouseout="style.backgroundColor='#FFFFFF';" width="249">
  64.                <font color="#4A4A4A" face="Verdana" size="2">
  65.                  <a href="home.html">&nbsp;&nbsp;&nbsp;Strona główna</a>
  66.                </font>
  67.              </td>
  68.            </tr>      
  69.        <tr id="qr_opena1175" style="display:none;position:relative;">
  70.              <td height="25" style="border-bottom: 1px solid #E8E8E8;" onmouseover="style.backgroundColor='#F9F9F9';" onmouseout="style.backgroundColor='#FFFFFF';" width="249">
  71.                <font color="#4A4A4A" face="Verdana" size="2">
  72.                  <a href="home.html">&nbsp;&nbsp;&nbsp;Strona główna</a>
  73.                </font>
  74.              </td>
  75.            </tr>
  76.        </table>


i teraz chce zrobic tak zeby po kliknieciu na "menu glowne" pokazywaly sie wszystkie komorki a nie tylko pierwsza. Zastanawiam sie jeszcze czy nie mozna tego kodu uproscic?

Z gory dzieki za odpowiedz, pozdrawiam dex.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 29.06.2025 - 03:08