Avatar billede mini-me Nybegynder
12. januar 2004 - 16:25 Der er 7 kommentarer og
1 løsning

Problemer med undermenuer

Hej Eksperter,

Det skal lige siges at der er 200 point til den som kan løse mit problem, men lige p.t kan jeg ikke give nogen da jeg efter opdateringen af eksperten kun har 0 point :-) Men skal nok give dem så snart systemet køre igen.



Så er jeg på den igen, jeg er igang med at lave en dropdown menu, problemet er bare at jeg har valgt, at det skal være muligt at kunne trykke hele kolonnen når man vil skifte side. Samt at når man køre musen hen over min <tr> så skiftes baggrundsfarven.

Det jeg har fået lavet ind til videre virker rigtig fint på hovedmenuerne, men hvis jeg så klikker på link i undermenuen, så får jeg bare hovedmenuen smidt i hovedt. Undermenuen sender det rigtige ID' tilbage hvis jeg tester med en alert... men bagefter sender den så hovedmenu id'et og jeg ved ikke hvorfor javascriptet så vælger at gå til hovedsiden istedet.

Ydereligere så er der et problem med Bold effekten... hvis jeg køre over et hovedmenupunkt bliver mine undermenuer også fede..!!

<script type="text/JavaScript">
var actCell, loc = location.href;
actCell = (loc.indexOf("?c=")!=-1)? loc.split("?")[1].split("=")[1] : false;
function mOver(c) {
    if (c.id==actCell) return;
    c.style.backgroundColor = "#C5BD94";
    c.style.fontWeight  = "bold";
}
function mOut(c) {
    if (c.id==actCell) return;
    c.style.backgroundColor = "#E9E7D6";
    c.style.fontWeight  = "Normal";
   
}
function mClick(c, url) {
    location.href = url;
}
window.onload = function() {
    if (actCell) {
        document.getElementById(actCell).style.backgroundColor = "#ff0000";
        document.getElementById(actCell).style.color = "#ffffff";
    }
}
</script>

<body>
<table width="950" height="475" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <Td height="25" colspan="6">&nbsp;</Td>
  </tr>
  <tr>
    <td height="20" colspan="4" bgcolor="E9E7D6" class="TD">
    <%
        strSQL = "SELECT * From Pages order by sortorder asc"
        countSQL = "SELECT count(*) as totalMenu From Pages"
        set rs = conn.execute(strSQL)
        set countRS = conn.execute(countSQL)
        totalMenues = countRS("TotalMenu")
        totalMenuesWidth = 680 / totalMenues / 3.5
        totalMenuesWidth = totalMenuesWidth / 2
       
        while not rs.eof or rs.bof
        ' Total Size of MenuBar 680px
       
        title=rs("title")   
        divStr = REPLACE(title&rs("id")," ","")
        divStr = Replace(divStr,"-","")
    %>
      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(<% = divStr %>);">
        <tr nowrap id="c<% = rs("id") %>" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=<% = rs("id") %>')">
          <td width="<% = totalMenuesWidth %>" nowrap>
              <div id="<% = divStr %>" onMouseOut="closeDropdown(<% = divstr %>)" style="position:absolute; display: none; z-index:2;">
              <% if rs("SubMenu") = True then
                  'Create menu
                subSQL = "SELECT submenu.id, submenu.MainId, submenu.SubId, submenu.SortOrder, Pages.title FROM submenu INNER JOIN Pages ON submenu.SubId = Pages.id where submenu.mainId =" & rs("id")
                set rsSub = conn.execute(subSQL)
              %>
              <table width="0" border="0" cellpadding="0" cellspacing="0" class="subMenu">
                <tr>
                  <td colspan="3" height="12"></td>
                </tr>
                <%  while not rsSub.eof or rsSub.bof %>
                <tr class="menu" nowrap id="c<% = rsSub("subId") %>" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=<% = rs("id") %>')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><% = rsSub("Title") %></font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
                <% rsSub.movenext
                  wend
                  set rsSub = nothing
                  %>
              </table>
              <% end if %>
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1"><% = title %></font></td>
      <td width="<% = totalMenuesWidth %>" nowrap>&nbsp;</td>
      </tr>
    </table>
<%
        idstring=idstring&"'"&divStr&"',"
        rs.movenext   
        wend
        set rs = nothing
    %>
      <script language="JavaScript">
                var idarray= new Array(<% = left(idstring,len(idstring)-1)%>)
                function showDropdown(sender)
                {
                    for(var i=0;i<idarray.length;i++){
                        document.getElementById(idarray[i]).style.display = "none"
                    }
                    sender.style.display = ""
                }
               
                               
                function closeDropdown(sender)
                {
                sender.style.display = "none"
                } 
            </script>
Avatar billede roenving Novice
12. januar 2004 - 16:48 #1
Kan du prøve at vise kilden (f.eks. fra en aktuel test !-), for det kan jo blive noget anderledes efter databasen er læst ...
Avatar billede mini-me Nybegynder
12. januar 2004 - 16:51 #2
okay.. 2 sek:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//DA" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>

</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stylesheets/template03.asp" rel="stylesheet" type="text/css">
</head>
<script type="text/JavaScript">
var actCell, loc = location.href;
actCell = (loc.indexOf("?c=")!=-1)? loc.split("?")[1].split("=")[1] : false;
function mOver(c) {
    if (c.id==actCell) return;
    c.style.backgroundColor = "#C5BD94";
    c.style.fontWeight  = "bold";
}
function mOut(c) {
    if (c.id==actCell) return;
    c.style.backgroundColor = "#E9E7D6";
    c.style.fontWeight  = "Normal";
   
}
function mClick(c, url) {
    location.href = url;
}
function mSubClick(c, url) {
    location.href = url;
}
</script>

<body>
<table width="950" height="475" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <Td height="25" colspan="6">&nbsp;</Td>
  </tr>
  <tr>
    <td height="20" colspan="4" bgcolor="E9E7D6" class="TD">
   
      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(Home824);">
        <tr nowrap id="c824" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=824')">
          <td width="9,71428571428571" nowrap>
              <div id="Home824" onMouseOut="closeDropdown(Home824)" style="position:absolute; display: none; z-index:2;">
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Home</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(About826);">
        <tr nowrap id="c826" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=826')">
          <td width="9,71428571428571" nowrap>
              <div id="About826" onMouseOut="closeDropdown(About826)" style="position:absolute; display: none; z-index:2;">
             
              <table width="0" border="0" cellpadding="0" cellspacing="0" class="subMenu">
                <tr>
                  <td colspan="3" height="12"></td>
                </tr>
               
                <tr class="menu" nowrap id="c827" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=827')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">The Philosophy</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c828" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=828')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">The Mission</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
              </table>
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">About</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(Services829);">
        <tr nowrap id="c829" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=829')">
          <td width="9,71428571428571" nowrap>
              <div id="Services829" onMouseOut="closeDropdown(Services829)" style="position:absolute; display: none; z-index:2;">
             
              <table width="0" border="0" cellpadding="0" cellspacing="0" class="subMenu">
                <tr>
                  <td colspan="3" height="12"></td>
                </tr>
               
                <tr class="menu" nowrap id="c830" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=830')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Strategic Advice and Sparring</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c831" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=831')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Graphical Design</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c832" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=832')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Advertising</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c833" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=833')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Exhibitions and Events</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c834" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=834')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Extending Your Products</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c835" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=835')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">PR</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
              </table>
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Services</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(ClientConcept836);">
        <tr nowrap id="c836" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=836')">
          <td width="9,71428571428571" nowrap>
              <div id="ClientConcept836" onMouseOut="closeDropdown(ClientConcept836)" style="position:absolute; display: none; z-index:2;">
             
              <table width="0" border="0" cellpadding="0" cellspacing="0" class="subMenu">
                <tr>
                  <td colspan="3" height="12"></td>
                </tr>
               
                <tr class="menu" nowrap id="c837" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=837')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Size does matter</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c838" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=838')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Knowledge Sharing</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c839" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=839')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">The Client Roadmap</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c840" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=840')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">The Agreement</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c856" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=856')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Marketing Partnerships</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c857" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=857')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Close-up Clients</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c858" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=858')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Arm's Length Clients</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
              </table>
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Client Concept</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(Networking841);">
        <tr nowrap id="c841" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=841')">
          <td width="9,71428571428571" nowrap>
              <div id="Networking841" onMouseOut="closeDropdown(Networking841)" style="position:absolute; display: none; z-index:2;">
             
              <table width="0" border="0" cellpadding="0" cellspacing="0" class="subMenu">
                <tr>
                  <td colspan="3" height="12"></td>
                </tr>
               
                <tr class="menu" nowrap id="c842" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=842')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">An International Agency</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c843" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=843')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Partner Network</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c844" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=844')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Seeking International Partners</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
              </table>
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Networking</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(Jobs845);">
        <tr nowrap id="c845" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=845')">
          <td width="9,71428571428571" nowrap>
              <div id="Jobs845" onMouseOut="closeDropdown(Jobs845)" style="position:absolute; display: none; z-index:2;">
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Jobs</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(Showroom846);">
        <tr nowrap id="c846" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=846')">
          <td width="9,71428571428571" nowrap>
              <div id="Showroom846" onMouseOut="closeDropdown(Showroom846)" style="position:absolute; display: none; z-index:2;">
             
              <table width="0" border="0" cellpadding="0" cellspacing="0" class="subMenu">
                <tr>
                  <td colspan="3" height="12"></td>
                </tr>
               
                <tr class="menu" nowrap id="c847" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=847')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Visual Identity</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c848" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=848')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Promotion</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c849" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=849')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Advertising</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c850" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=850')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Web Sites</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c851" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=851')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Exhibitions</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
                <tr class="menu" nowrap id="c852" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=852')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Case Story</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
              </table>
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Showroom</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(Downloads853);">
        <tr nowrap id="c853" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=853')">
          <td width="9,71428571428571" nowrap>
              <div id="Downloads853" onMouseOut="closeDropdown(Downloads853)" style="position:absolute; display: none; z-index:2;">
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Downloads</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(Contact854);">
        <tr nowrap id="c854" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=854')">
          <td width="9,71428571428571" nowrap>
              <div id="Contact854" onMouseOut="closeDropdown(Contact854)" style="position:absolute; display: none; z-index:2;">
             
              <table width="0" border="0" cellpadding="0" cellspacing="0" class="subMenu">
                <tr>
                  <td colspan="3" height="12"></td>
                </tr>
               
                <tr class="menu" nowrap id="c855" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mSubClick(this,'?Id=855')">
                  <td width="10" class="leftBottom" nowrap>&nbsp;</td>
                  <td width="0" class="Bottom" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1">E-mail</font></td>
                  <td width="30" class="RightBottom" nowrap>&nbsp;</td>
                </tr>
               
              </table>
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Contact</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <table width="0" border="0" cellpadding="0" cellspacing="0" align="left" height="0" onMouseOver="showDropdown(LogIn859);">
        <tr nowrap id="c859" style="cursor:pointer;cursor:hand;" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this, '?Id=859')">
          <td width="9,71428571428571" nowrap>
              <div id="LogIn859" onMouseOut="closeDropdown(LogIn859)" style="position:absolute; display: none; z-index:2;">
             
          </div>
        </td>
      <td height="10" align="left" nowrap>  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Log-In</font></td>
      <td width="9,71428571428571" nowrap>&nbsp;</td>
      </tr>
    </table>

      <script language="JavaScript">
                var idarray= new Array('Home824','About826','Services829','ClientConcept836','Networking841','Jobs845','Showroom846','Downloads853','Contact854','LogIn859')
                function showDropdown(sender)
                {
                    for(var i=0;i<idarray.length;i++){
                        document.getElementById(idarray[i]).style.display = "none"
                    }
                    sender.style.display = ""
                }
               
                               
                function closeDropdown(sender)
                {
                sender.style.display = "none"
                } 
            </script>
Avatar billede roenving Novice
12. januar 2004 - 17:20 #3
Jeg kan ikke forklaringen, men to steder kan jeg se potentielt farlige ting:

Din funktion prøver fra start at finde aktuel celle med:

actCell = (loc.indexOf("?c=")!=-1)? loc.split("?")[1].split("=")[1] : false;

-- altså c= , mens du giver dem ?Id=824 osv.

-- måske har du den samme i dit asp-script ?-)

-- desuden har du konsekvent ikke dine menu-navne i streng-afgrænsere, den ville jeg i hvert fald også ændre:

<div id="LogIn859" onMouseOut="closeDropdown('LogIn859')" style="position:absolute; display: none; z-index:2;">
Avatar billede mini-me Nybegynder
12. januar 2004 - 17:41 #4
Hmmm hvis jeg gør det virker mit scipt slet ikke... se evt en demo her:

http://www.ew-server.dk:81/tmp.asp
Avatar billede mini-me Nybegynder
12. januar 2004 - 18:39 #5
anyone?
Avatar billede mini-me Nybegynder
12. januar 2004 - 19:37 #6
Hmmm skal jeg prøve at forklare det dybere??

Hvis i kigger forbi siden, og trykker på et hovedlink får i id´et på hovedlinket, hvis i så trykker på en undermenu får i først undermenu id´et men bagefter så hovedmenuen... og i stedet for at få underside id´et så bliver det hoved id´et!!?!!

Hjælp... anyone..
Avatar billede mini-me Nybegynder
12. januar 2004 - 19:51 #7
kan da glædeligt smide flere points i, når der engang bliver opdateret her på eksperten.
Avatar billede mini-me Nybegynder
13. januar 2004 - 16:21 #8
Jeg lukker
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester