Jeg poster lige min kode fra index siden og iframesiden... Måske det så er lettere :
Index siden:
<% @language="VBScript" %>
<%
strConn ="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("info.mdb")
Set objRS = Server.CreateObject("ADODB.RecordSet")
If (Session("Antal") = "") Then
objRS.Open "SELECT * FROM counter", strConn, 2, 3, &H0001
objRS("Antal") = objRS("Antal") + 1
Session("Antal") = objRS("Antal")
If (date = objRS("Dato")) Then
objRS("Antal_dag") = objRS("Antal_dag") + 1
else
objRS("Dato") = date
objRS("Antal_dag") = 1
End if
Session ("Dag") = objRS("Antal_dag")
objRS.Update
objRS.Close
Set objRS = Nothing
End If
Function FormatTimeDato(theDate)
FormatTimeDato = day(thedate) & "/" & month(thedate) & "-" & year(thedate)
End Function
%>
<html>
<head>
<meta http-equiv="Content-Language" content="da">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Bolig-Bornholm.dk</title>
<link rel="stylesheet" type="text/css" href="default.css">
<script language="Javascript">
function mIn(menu)
{
menu.style.background = "#99CCFF";
menu.style.border ="1 solid #000000";
menu.style.cursor = "hand";
}
function mOut(menu)
{
if (document.all) {
menu.style.background = "#CCCCCC";
menu.style.border ="1 solid #CCCCCC";
}
}
var cm=null;
document.onclick = new Function("show(null)")
function getPos(el,sProp) {
var iPos = 0
while (el!=null) {
iPos+=el["offset" + sProp]
el = el.offsetParent
}
return iPos
}
function show(el,m) {
if (m) {
m.style.display='';
m.style.pixelLeft = getPos(el,"Left") - 5
m.style.pixelTop = getPos(el,"Top") + el.offsetHeight + 1
}
if ((m!=cm) && (cm)) cm.style.display='none'
cm=m
}
window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" scroll="no">
<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" valign="top" height="0%" style="border-left: 1 solid #000000; border-right: 1 solid #000000; border-top: 1 solid #000000">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="0%" valign="middle" height="100%" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="0%">
<tr>
<td width="100%" height="0%">hje</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" valign="top" height="0%" align="center" colspan="3">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="13%" valign="middle" height="100%" bgcolor="#CCCCCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="0%">
<tr>
<td width="100%" height="0%" style="border-top: 1 solid #000000" ID="d0" onmouseover="show(this);"><p align="center"><a href="indhold.asp?id=2" target="indhold" class="menulayout"><B><font size="2">Profil</font></b></a></td>
<td width="0%" height="0%"><img border="0" src="PIC/Menuadskil.gif" width="20" height="20"></td>
</tr>
</table>
</td>
<td width="13%" valign="middle" height="100%" bgcolor="#CCCCCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="0%">
<tr>
<td width="100%" height="0%" style="border-top: 1 solid #000000" ID="d1" onmouseover="show(this,ds1);"><p align="center"><a href="indhold.asp?id=3" target="indhold" class="menulayout"><B><font size="2">Referencer</font></b></a></td>
<td width="0%" height="0%"><img border="0" src="PIC/Menuadskil.gif" width="20" height="20"></td>
</tr>
</table>
</td>
<td width="13%" valign="middle" height="100%" bgcolor="#CCCCCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="0%">
<tr>
<td width="100%" height="0%" style="border-top: 1 solid #000000" ID="d2" onmouseover="show(this,ds2);"><p align="center"><a href="indhold.asp?id=4" target="indhold" class="menulayout"><B><font size="2">Sommerhuse</font></b></a></td>
<td width="0%" height="0%"><img border="0" src="PIC/Menuadskil.gif" width="20" height="20"></td>
</tr>
</table>
</td>
<td width="13%" valign="middle" height="100%" bgcolor="#CCCCCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="0%">
<tr>
<td width="100%" height="0%" style="border-top: 1 solid #000000" ID="d3" onmouseover="show(this,ds3);"><p align="center"><a href="indhold.asp?id=5" target="indhold" class="menulayout"><B><font size="2">Andelsboliger</font></b></a></td>
<td width="0%" height="0%"><img border="0" src="PIC/Menuadskil.gif" width="20" height="20"></td>
</tr>
</table>
</td>
<td width="13%" valign="middle" height="100%" bgcolor="#CCCCCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="0%">
<tr>
<td width="100%" height="0%" style="border-top: 1 solid #000000" ID="d4" onmouseover="show(this,ds4);"><p align="center"><a href="indhold.asp?id=6" target="indhold" class="menulayout"><B><font size="2">Kontakt</font></b></a></td>
<td width="0%" height="0%"><img border="0" src="PIC/Menuadskil.gif" width="20" height="20"></td>
</tr>
</table>
</td>
<td width="13%" valign="middle" height="100%" bgcolor="#CCCCCC">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="0%">
<tr>
<td width="100%" height="0%" style="border-top: 1 solid #000000" ID="d0" onmouseover="show(this);"><p align="center"><a href="indhold.asp?id=1" target="indhold" class="menulayout"><B><font size="2">Hjem</font></b></a></td>
<td width="0%" height="0%"><img border="0" src="PIC/Menuadskil.gif" width="20" height="20"></td>
</tr>
</table>
</td>
<td width="100%" valign="middle" height="100%" style="border-top: 1 solid #000000" bgcolor="#CCCCCC">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" valign="top" height="0%" style="border: 1 solid #000000" bgcolor="#FFFFFF"><img src="pic/transparent.gif" width="1" height="1"></td>
</tr>
<tr>
<td width="100%" valign="top" height="0%" style="border-bottom: 1 solid #000000;border-left: 1 solid #000000;border-right: 1 solid #000000;" bgcolor="#FFFFFF"><img src="pic/transparent.gif" width="1" height="1"></td>
</tr>
<tr>
<td width="100%" valign="top" height="100%" style="border-left: 1 solid #000000; border-right: 1 solid #000000; border-bottom: 1 solid #000000">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%" height="100%" valign="middle" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="15%" height="100%" style="border-bottom: 1 solid #000000" valign="top" bgcolor="#FFFFFF" onmouseover="show(this);">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%" height="17" bgcolor="#CCCCCC" style="border-bottom: 1 solid #000000"><p align="center"> </td>
</tr>
<tr>
<td width="100%" valign="top" height="100%" style="border-right: 1 solid #000000"><Iframe name="nyheder" scrolling="no" frameborder="0" width="100%" Height="100%" src="nyheder.asp"></Iframe></td>
</tr>
</table>
</td>
<td width="85%" height="100%" valign="top" style="border-bottom: 1 solid #000000" bgcolor="#FFFFFF" onmouseover="show(this);">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="0%" height="0%"><img border="0" src="PIC/Top.gif" width="242" height="17"></td>
<td width="100%" height="0%">
<p align="center"><b><%request.form("test")%></b></td>
</tr>
<tr>
<td width="100%" height="100%" colspan="2"><Iframe name="indhold" id="indhold" scrolling="yes" frameborder="0" width="100%" Height="100%" src="indhold.asp"></Iframe></td>
</tr>
<tr>
<td width="100%" height="0%" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%" height="0%" style="padding-left: 5">Du er besøgende nr.: <%= Session("Antal") %> - antal besøgende i dag: <%= Session("dag") %></td>
<td width="0%" height="0%"><img border="0" src="PIC/bund.gif" width="245" height="17"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="90%" height="0%" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="15%" height="100%" bgcolor="#99CCFF">
<p align="center">Dato:<%=FormatTimeDato(Now)%></td>
<td width="85%" valign="middle" height="100%" bgcolor="#99CCFF"><p align="center"><font face="Verdana" size="2">Copyright 2002 © Nordbornholms Byggeforretning
ApS &
<a href="
http://www.d-form.dk" target="_blank">d-form.dk</a></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-------------------------Undermenuer til menuen------------------------------------->
<!-- Undermenu 1 -->
<DIV ID="ds1" name="Referencer" CLASS="submenu" STYLE="display: none; ">
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=31" class="link" target="indhold">- Andelsboliger</a></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=32" class="link" target="indhold">- Sommerhuse</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=33" class="link" target="indhold">- Andre</A></td></tr>
</table>
</DIV>
<!-- Undermenu 1 afsluttes-->
<!-- Undermenu 2 -->
<DIV ID="ds2" name="Sommerhuse" CLASS="submenu" STYLE="display: none; ">
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=41" class="link" target="indhold">- Introduktion</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=42" class="link" target="indhold">- Typer</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=43" class="link" target="indhold">- Huset</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=44" class="link" target="indhold">- Billedgalleri</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=45" class="link" target="indhold">- Projekter</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=46" class="link" target="indhold">- Økonomi</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=47" class="link" target="indhold">- Materialer</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=48" class="link" target="indhold">- Brochurer</A></td></tr>
</table>
</DIV>
<!-- Undermenu 2 afsluttes -->
<!-- Undermenu 3 -->
<DIV ID="ds3" name="Andelsboliger" CLASS="submenu" STYLE="display: none; ">
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=51" class="link" target="indhold">- Introduktion</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=52" class="link" target="indhold">- Typer</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=53" class="link" target="indhold">- Huset</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=54" class="link" target="indhold">- Billedgalleri</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=55" class="link" target="indhold">- Projekter</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=56" class="link" target="indhold">- Økonomi</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=57" class="link" target="indhold">- Materialer</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=58" class="link" target="indhold">- Brochurer</A></td></tr></table>
</DIV>
<!-- Undermenu 3 afsluttes -->
<!-- Undermenu 4 -->
<DIV ID="ds4" name="Kontakt" CLASS="submenu" STYLE="display: none; ">
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=61" class="link" target="indhold">- Generel info</a></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=62" class="link" target="indhold">- Hovedafd. BH</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=63" class="link" target="indhold">- Salgsafd. BH</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=64" class="link" target="indhold">- Salgsafd. Sjæll</A></td></tr>
<tr><td onmouseover="mIn(this);" onmouseout="mOut(this);" class="substyle"><a HREF="indhold.asp?id=65" class="link" target="indhold">- Ledige jobs</A></td></tr>
</table>
</DIV>
<!-- Undermenu 4 afsluttes -->
</body>
</html>
--------------------------------------------------------------------
og her min iframe side indhold.asp
--------------------------------------------------------------------
<%
If Len(Request.Servervariables("query_string")) = 0 then
Response.Redirect Request.Servervariables("script_name") & "?ID=1"
end if
Response.Buffer = True
' Tilslutning til databasen
Set Con = Server.CreateObject("ADODB.Connection")
DBPath = "DBQ=" & server.mappath("info.mdb")
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & DBPath
Dim strID
strID = Request.QueryString("ID")
Sql = "SELECT * from info WHERE id = " & strID & " ORDER BY id DESC"
Set Record = con.Execute(sql)
%>
<html>
<head>
<meta http-equiv="Content-Language" content="da">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Ny side 1</title>
<link rel="stylesheet" type="text/css" href="default.css">
<STYLE type=text/css>
BODY{
scrollbar-3dlight-color: #000000;
scrollbar-arrow-color: #000000;
scrollbar-base-color: #FFFFFF;
scrollbar-dark-shadow-color: #FFFFFF;
scrollbar-face-color: #C0C0C0;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #FFFFFF;
}
</STYLE>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
<!-- her skal den skrive menu navn og sende det til index3.asp - i formen altså-->
<form method="post" action="indhold.asp" name="test" id="test"><input type="hidden" value"<%Response.Write Record("MenuNavn")%>"></form>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td style="padding: 5" valign="top" class="text">
<% Response.Write Record("indhold") %>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
' Lukker forbindelsen
Con.Close
Set Con = Nothing
%>