Hvordan undgår jeg at min menu collapser, når jeg viser ny side?
Hej AlleJeg er ved at lave en webside, som består af 3 frames: top, menu, main alle bliver hentet på siden default.asp
Mit problem er, at når jeg opretter links i frame 'menu' til siderne som skal vises i frame 'main', så collapser min menu, hvilken den ikke skal gøre - det menupunkt som linket kommer fra skal stå "åben".
Koden til frame 'menu' er vist nedenfor, håber der er nogle der kan se problemet - hvis i behøver mere info, så hører jeg gerne fra jer :o)
Kilden default.asp ser ud som følger:
----------
<%@ language=VBScript %>
<!--#include file="GlobalResources/Scripts/GlobalData.asp"-->
<%
vBMID = Request.QueryString("BMID").Item
If vBMID = "" Then
goStr = "/Read.asp?DocID=" + Cstr(StartPageID)
Else
goStr = "/Read.asp?DocID=" + vBMID
End IF
%>
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>
<frameset rows="98,*" framespacing="0" border="0" frameborder="0">
<frame name="top" src="/top.asp" marginwidth="10" marginheight="10" scrolling="no" noresize target="content">
<frameset cols="183,*">
<frame name="menu1" src="/menu1.asp" marginwidth="10" marginheight="10" scrolling="no" noresize>
<frame name="main" src="<%=goStr%>" marginwidth="0" marginheight="0" scrolling="auto" noresize target="content">
</frameset>
<noframes>
<body>
<p>På denne side anvendes FRAMES som ikke understøttes af din browser. Prøv at opdatere din browser på http://www.microsoft.com/danmark/.</p>
</body>
</noframes>
</frameset>
</html>
----------
Kilden til menu ser ud som følger:
----------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
constMaxItem=2;
function fnDispThis(active)
{
for (i=1; i < constMaxItem+1; i++)
{
if (i!=active)
{
document.all["sub"+i].style.display="NONE"
}
else
{
if (document.all["sub"+active].style.display=="") {
document.all["sub"+active].style.display="NONE"
}
else {
document.all["sub"+active].style.display=""
}
}
}
}
</script>
</head>
<body text="#000000" link="#000000" vlink="#000000" alink="#660000" onLoad="fnDispThis(1);" background="/grafik/block_gray.jpg">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" onclick="fnDispThis(1);"><img src="grafik/infoTOP.gif" alt="" width="137" height="18" border="0">
<div id="sub1" style="display:none;">
<table cellspacing="0" cellpadding="2">
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="/Read.asp?DocID=147" target="main" onmouseover="window.status='Forside'; return true" onmouseout="window.status=''; return true" class="menu">»
Forside</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="/Read.asp?DocID=153" target="main" onmouseover="window.status='Bestyrelse'; return true" onmouseout="window.status=''; return true" class="menu">»
Bestyrelse</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='Ansatte'; return true" onmouseout="window.status=''; return true" class="menu">»
Ansatte</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='Kontingent'; return true" onmouseout="window.status=''; return true" class="menu">»
Kontingent</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='Advokatbistand'; return true" onmouseout="window.status=''; return true" class="menu">»
Advokatbistand</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='Socialrådgiverbistand'; return true" onmouseout="window.status=''; return true" class="menu">»
Socialrådgiverbistand</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='Åbningstider'; return true" onmouseout="window.status=''; return true" class="menu">»
Åbningstider</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='Udvalg'; return true" onmouseout="window.status=''; return true" class="menu">»
Udvalg</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='SiD-Ungdom'; return true" onmouseout="window.status=''; return true" class="menu">»
SiD-Ungdom</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" onmouseover="window.status='Vedtægter'; return true" onmouseout="window.status=''; return true" class="menu">»
Vedtægter</a></font></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td align="left" valign="top" onclick="fnDispThis(2);"> <img src="grafik/akasseTOP.gif" alt="" width="137" height="18" hspace="0" vspace="0" border="0" class="img_header">
<div id="sub2" style="display:none;">
<table cellspacing="2" cellpadding="2">
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" target="_blank" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Debatforum</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Konkurrencer</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Afstemning</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Wallpapers</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Sangbog</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Tiger Times</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Links</a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="#" class="menu" onmouseover="window.status='#'; return true" onmouseout="window.status=''; return true">»
Links</a></font></td>
</tr>
</table>
</div></td>
</tr>
</table>
</body>
</html>
----------