[JS] Rozwijane menu,Bardzo pilnie potrzebna pomoc

0
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta />
<link rel="stylesheet" href="style.css" type="text/css" /><title>I LO Chodziez</title></head>
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table cellpadding="0" cellspacing="0" width=750 align=center >
        <tr><td valign=top colspan="3">
                <table cellpadding="0" cellspacing="0" width=750>
                        <tr><td rowspan=2 style="width:309;height:107"><img src="images/t1.jpg" /></td>
                        <td style="width:441;height:29;"><img src="images/t2.jpg" border="0" /></td>
                  </tr>
                        <tr><td style="width:441;height:78;background:url(images/t3.jpg)" valign=top>        <!-- miejsce na banner -->
                
                                

                
                
                <!-- koniec --></td></tr>
                <!-- menu górne, w pliku menu-top.psd napisz swoje linki i zrób "mape odsyłaczy" -->
                                        <map name="menu-top">
        <area shape="rect" coords="369,-2,440,50" href="index.php"/>
        <area shape="rect" coords="448,3,592,38" href="http://lo.chodziez.net.pl/nieobecni/pokaz.php"/>
        <area shape="rect" coords="595,4,663,40" href="http://lo.chodziez.net.pl/galeria/index.php"/>
        <area shape="rect" coords="669,2,750,39" href="index.php?=kontakt"/>
</map>
                
                        <tr><td colspan=2><img src="images/top_menu.jpg" usemap="#menu-top" border="0" width="750" height="46" alt="" /></td>
                  </tr>
                        <tr><td colspan=2><img src="images/s1.jpg" /></td></tr>

                </table>
        </td></tr>
        <tr>
        <td valign=top style="width:152">
        
         <!-- menu lewe -->
                 <table cellpadding="0" cellspacing="0" width="152">
                         <tr><td><img src="images/m_top_l.jpg" /></td></tr>
                         <tr><td style="background:url(images/m_srodek_l.jpg)" class="l_menu">

                           <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=news">Home</a></div>
                           <DIV CLASS="menbar1" ID="menbar1" 
STYLE="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196';visibility:hide;" >
                             <table bgcolor="#FDE196" width="114">
                               <tr>
                                 <td><a href="javascript:change(1)"><font size="1">O szkole 
                                        [6]</font></a></td>
                           </tr>
                         </table>
                       </DIV>
<DIV CLASS="menbar2" ID="menbar2" 
STYLE="padding-left:3px;width:125;top:1;visibility:hide;display:none;">
<table bgcolor="#FDE196"><tr><td bgcolor="#FDE196">
<a href="javascript:change(2)"><font size="1">O szkole [x]</font></a><br>
</td></tr><tr><td>

<font size="1"><a href="index.php?id=notulln">Wymiana z Notulln</a></font><font size="1"><br>
<a href="index.php?id=edj">EDJ w LO</a><br><a href="index.php?id=statut">Statut</a><br>
<a href="index.php?id=patron">Patron</a><br><a href="index.php?id=historia">Historia</a><br>
</font><a href="index.php?id=kadra"><font size="1">Kadra</font></a><br>
</td></tr></table>
</DIV>
                           <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="http://www.lo.chodziez.net.pl/galeria/index.php">Galeria</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=planlekcji">Plan Lekcji</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Uczniowie</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=harmonogram">Harmonogram Pracy</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=kiermasz">Kiermasz Książek</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="#" onMouseOver="showmenu(event,linkset[2])" onMouseOut="delayhidemenu()">Sport</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=biblioteka">Biblioteka</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=salka">Korzystanie z Sali</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=prackomp">Pracownie Komputerowe</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="http://www.forum.chodziez.net.pl/">Forum</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=ksiega">Księga Gości</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?=gazetka">Gazetka Szkolna</a></div>
                           <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=linki">Linki</a></div>
                <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=download">Download</a></div>
                <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=kontakt">Kontakt</a></div>
                         
<script language="Javascript1.2"> 
<!--
// original content taken from Nic's JavaScript Page with permission
// lack of these three lines will result in copyright infringment
// made by: Nic's JavaScript Page - http://www.javascript-page.com

var JX = 0;
var JY = 0;
var wm;

if (document.layers){
wm = document.menbar1;
}

if (document.all) {
wm = document.all.menbar1;
}

function change(wow) {

  if (document.layers){
    if (wow == 1) {
      wm.visibility = "hide";
      wm = document.menbar2;
    }
    if (wow == 2) {
      wm.visibility = "hide";
      wm = document.menbar1;
    }
  }

  if (document.all){
    if (wow == 1) {
      wm.style.display = "none";
      wm = document.all.menbar2;
    }
    if (wow == 2) {
      wm.style.display = "none";
      wm = document.all.menbar1;
    }
  }
}

function menbar() {

 if (document.layers){
   JX = window.pageXOffset;
   JY = window.pageYOffset;
   wm.visibility = "hide";
   wm.top = JY;
   wm.left = JX;
   wm.visibility= "show";
 }

 if (document.all){
  if (navigator.appVersion.indexOf("Mac") == -1){
   wm.style.display = "none";
   JX = document.body.scrollLeft;
   JY = document.body.scrollTop;
   wm.style.top  = JY;
   wm.style.left = JX;
   wm.style.display = "";
  }
 }
}

setInterval("menbar()",100);

//-->
</script>

                         </td></tr>
                         <tr><td><img src="images/m_dol_l.jpg" /></td></tr>
                 </table>
        
        <!-- --------- -->
        </td>
        <td valign=top style="width:446;height:100%">
        <!-- środek szablonu -->
                <table cellpadding="0" cellspacing="0" width=446 height=100%>
                <tr><td style="background:url(images/s2.jpg);height:31" ></td></tr>
                <tr><td style="background:url(images/tlo_s.jpg);height:100%;padding:0 10 0 10;" class="st_font" valign="top">

<?php
if(empty($_GET['id']) or $_GET['id']=="news"){
$number = "5";
include("cutenews/show_news.php"); 
}
if($_GET['id']=="edj"){
include("edj.html");
}
if($_GET['id']=="notulln"){
include("notulln.html");
}
if($_GET['id']=="statut"){
include("statut.html");
}
if($_GET['id']=="patron"){
include("patron.html");
}
if($_GET['id']=="historia"){
include("historia.html");
}
if($_GET['id']=="planlekcji"){
include("planlekcji.html");
}
if($_GET['id']=="harmonogram"){
include("harmonogram.html");
}
if($_GET['id']=="kiermasz"){
include("kiermasz.html");
}
if($_GET['id']=="pilka"){
include("pilka.html");
}
if($_GET['id']=="siatka"){
include("siatka.html");
}
if($_GET['id']=="rekordy"){
include("rekordy.html");
}
if($_GET['id']=="dziensportu"){
include("dziensportu.html");
}
if($_GET['id']=="wybabs"){
include("wyb.html");
}
if($_GET['id']=="laureaci"){
include("laureaci.html");
}
if($_GET['id']=="samorzad"){
include("samorzad.html");
}
if($_GET['id']=="uczniowie"){
include("uczniowie.html");
}
if($_GET['id']=="biblioteka"){
include("biblioteka.html");
}
if($_GET['id']=="salka"){
include("salka.html");
}
if($_GET['id']=="prackomp"){
include("prackomp.html");
}
if($_GET['id']=="kontakt"){
include("kontakt.html");
}
if($_GET['id']=="download"){
include("download.html");
}
if($_GET['id']=="linki"){
include("linki.html");
}
if($_GET['id']=="ksiega"){
include("ksiega.html");
}
if($_GET['id']=="gazetka"){
include("gazetka.html");
}
?>                                                
                                                                                        
        
        
        
        
        
        
        
        
        
        
                </td></tr>
                </table>
        
        <!-- ---------------- -->
        
        </td>
        <td valign=top style="width:152">
        
         <!-- menu prawe -->
                 <table cellpadding="0" cellspacing="0" width="152">
                         <tr><td><img src="images/m_top_r.jpg" /></td></tr>
                         <tr><td style="background:url(images/m_tlo_r.jpg)" class="r_menu">
                         <center>
                         <img src="top10/1.gif" /><br  />
                         <img src="top10/2.gif" /><br  />
                         <img src="top10/3.gif" /><br  />
                         <img src="top10/4.gif" /><br  />
              znaczy się top 4 :D
                         
                         </center>
                         </td></tr>
                         <tr><td><img src="images/m_dol_r.jpg" /></td></tr>
                 </table>
        
        <!-- --------- -->
        
        
        
        </td>
        </tr>
        <tr><td valign=top colspan="3">
        <table cellpadding="0" cellspacing="0" width=750>
        <tr>
    
                <td><img src="images/d1.jpg" /></td>
                <td><img src="images/d2.jpg" /></td>
                <td><img src="images/d3.jpg" /></td>
        </tr>
        </table>
        
        </td></tr>
</table>

<!-- SiteSearch Google -->
<form method="get" action="http://www.google.pl/custom" target="google_window">
<table width="412" border="0" align="center" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="www.lo.chodziez.net.pl;www.sciaga.pl;www.bryk.pl"></input>
<label for="sbi" style="display: none">Wprowadź wyszukiwane hasła</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Prześlij formularz wyszukiwania</label>
<input type="submit" name="sa" value="Wyszukaj" id="sbb"></input>
</td></tr>
<tr>
<td><div align="center"></div></td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked id="ss0"></input>
<label for="ss0" title="Szukaj w Internecie"><font size="-1" color="black">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="www.lo.chodziez.net.pl" id="ss1"></input>
<label for="ss1" title="Wyszukaj www.lo.chodziez.net.pl"><font size="-1" color="black">www.lo.chodziez.net.pl</font></label></td>
</tr>
<tr>
<td>
<input type="radio" name="sitesearch" value="www.sciaga.pl" id="ss2"></input>
<label for="ss2" title="Wyszukaj www.sciaga.pl"><font size="-1" color="black">www.sciaga.pl</font></label></td>
<td>
<input type="radio" name="sitesearch" value="www.bryk.pl" id="ss3"></input>
<label for="ss3" title="Wyszukaj www.bryk.pl"><font size="-1" color="black">www.bryk.pl</font></label></td>
</tr>
</table>
<input type="hidden" name="client" value="pub-1051146619848862"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-2"></input>
<input type="hidden" name="oe" value="ISO-8859-2"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="pl"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
</body>
</html>

To jest kod mojego index.php Jest w nim 1 menu rozwijane {o szkole}. Potrzebuje jeszcze zrobić identyczne menu dla Sport i Uczniowie, ale nie potrafię tego. Chcę właśnie użyć ten skrypt i proszę was o pomoc aby ktoś przerobił ten kod tak, że będzie już takie menu dla Sport i Uczniowie. Bardzo pilnie !

0

Wydaje mi się, że pękacie jak widzicie tak długi kod. Proszę o przerobienie poniższego kodu tak aby menu rozwijane było też w SPORT i UCZNIOWIE !

         <!-- menu lewe -->
                 <table cellpadding="0" cellspacing="0" width="152">
                         <tr><td><img src="images/m_top_l.jpg" /></td></tr>
                         <tr><td style="background:url(images/m_srodek_l.jpg)" class="l_menu">

                           <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=news">Home</a></div>
                           <DIV CLASS="menbar1" ID="menbar1" 
STYLE="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196';visibility:hide;" >
                             <table bgcolor="#FDE196" width="114">
                               <tr>
                                 <td><a href="javascript:change(1)"><font size="1">O szkole 
                                        [6]</font></a></td>
                           </tr>
                         </table>
                       </DIV>
<DIV CLASS="menbar2" ID="menbar2" 
STYLE="padding-left:3px;width:125;top:1;visibility:hide;display:none;">
<table bgcolor="#FDE196"><tr><td bgcolor="#FDE196">
<a href="javascript:change(2)"><font size="1">O szkole [x]</font></a><br>
</td></tr><tr><td>

<font size="1"><a href="index.php?id=notulln">Wymiana z Notulln</a></font><font size="1"><br>
<a href="index.php?id=edj">EDJ w LO</a><br><a href="index.php?id=statut">Statut</a><br>
<a href="index.php?id=patron">Patron</a><br><a href="index.php?id=historia">Historia</a><br>
</font><a href="index.php?id=kadra"><font size="1">Kadra</font></a><br>
</td></tr></table>
</DIV>
                           <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="http://www.lo.chodziez.net.pl/galeria/index.php">Galeria</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=planlekcji">Plan Lekcji</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Uczniowie</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=harmonogram">Harmonogram Pracy</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=kiermasz">Kiermasz Książek</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="#" onMouseOver="showmenu(event,linkset[2])" onMouseOut="delayhidemenu()">Sport</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=biblioteka">Biblioteka</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=salka">Korzystanie z Sali</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=prackomp">Pracownie Komputerowe</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="http://www.forum.chodziez.net.pl/">Forum</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=ksiega">Księga Gości</a></div>
                                 <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?=gazetka">Gazetka Szkolna</a></div>
                           <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=linki">Linki</a></div>
                <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=download">Download</a></div>
                <div style="padding-left:3px;width:125" onMouseOver="this.style.background='#E0C379'" onMouseOut="this.style.background='#FDE196'"><a href="index.php?id=kontakt">Kontakt</a></div>
                         
<script language="Javascript1.2"> 
<!--
// original content taken from Nic's JavaScript Page with permission
// lack of these three lines will result in copyright infringment
// made by: Nic's JavaScript Page - http://www.javascript-page.com

var JX = 0;
var JY = 0;
var wm;

if (document.layers){
wm = document.menbar1;
}

if (document.all) {
wm = document.all.menbar1;
}

function change(wow) {

  if (document.layers){
    if (wow == 1) {
      wm.visibility = "hide";
      wm = document.menbar2;
    }
    if (wow == 2) {
      wm.visibility = "hide";
      wm = document.menbar1;
    }
  }

  if (document.all){
    if (wow == 1) {
      wm.style.display = "none";
      wm = document.all.menbar2;
    }
    if (wow == 2) {
      wm.style.display = "none";
      wm = document.all.menbar1;
    }
  }
}

function menbar() {

 if (document.layers){
   JX = window.pageXOffset;
   JY = window.pageYOffset;
   wm.visibility = "hide";
   wm.top = JY;
   wm.left = JX;
   wm.visibility= "show";
 }

 if (document.all){
  if (navigator.appVersion.indexOf("Mac") == -1){
   wm.style.display = "none";
   JX = document.body.scrollLeft;
   JY = document.body.scrollTop;
   wm.style.top  = JY;
   wm.style.left = JX;
   wm.style.display = "";
  }
 }
}

setInterval("menbar()",100);

//-->
</script>
0

Jeśli ktokolwiek pęka tutaj, to raczej na widok takiego bajzlu, a nie długiego kodu. To nie jest darmowy helpdesk. Spróbuj coś zrobić, jak sobie nie będziesz radził, to napisz, z czym masz problem, a nie "chcę, żebyście mi to przerobili". Kpina.

0

mówisz i masz:
Nie radzę sobie z utworzeniem drugiego rozwijanego menu. Dodaję menbar3 i menbar4, ale gdy wstawiam to na stronę kompletnie nic się nie rozwija, a jak już się rozwinie to się nie zwija, albo rozwija się nie to co trzeba. Pare dni już się męczę nad tym i kompletnie sobie nie radzę.

EDIT.
btw, 1 post:

To jest kod mojego index.php Jest w nim 1 menu rozwijane {o szkole}. Potrzebuje jeszcze zrobić identyczne menu dla Sport i Uczniowie, ale nie potrafię tego. Chcę właśnie użyć ten skrypt i proszę was o pomoc aby ktoś przerobił ten kod tak, że będzie już takie menu dla Sport i Uczniowie. Bardzo pilnie !

1 użytkowników online, w tym zalogowanych: 0, gości: 1