MaB
asked on
Can i get a asp generated link to work as an anchor and link to within the same page?
This question starts here:
https://www.experts-exchange.com/questions/20937192/How-to-write-the-SQL-query-in-ASP.html
But since it lead to a question not asked there I'm posting a new.
When using the code in the previous question the link to "B" opens in a new window. Is there any way I can get it to work as a normal anchor and link to a place in the same document. Can I "prerun" the query or something like that?
BR MaB
https://www.experts-exchange.com/questions/20937192/How-to-write-the-SQL-query-in-ASP.html
But since it lead to a question not asked there I'm posting a new.
When using the code in the previous question the link to "B" opens in a new window. Is there any way I can get it to work as a normal anchor and link to a place in the same document. Can I "prerun" the query or something like that?
BR MaB
ASKER
Yes the anst("anstID") is a bookmark on the same page so I will try your second tip. I'm using your first tip today and it works like this:
When clicking any of the links (A,B,C,D.....) the first time it opens a new window and navigates to the correct bookmark in that window. In that window I can use the A,B,C... links and it works as I want, moving to the correct bookmark in the same window.
Can you explain this behaviour?
Could you please explain how the Request.ServerVariables("S CRIPT_NAME ") works too?
I'm rather new to asp and are eager to learn more.
BR MaB
When clicking any of the links (A,B,C,D.....) the first time it opens a new window and navigates to the correct bookmark in that window. In that window I can use the A,B,C... links and it works as I want, moving to the correct bookmark in the same window.
Can you explain this behaviour?
Could you please explain how the Request.ServerVariables("S
I'm rather new to asp and are eager to learn more.
BR MaB
ASKER
...or exactly I'm using this right now producing the described behaviour:
<a href="#<%=anst("anstID")%> " target="_Self">A</a>
MaB
<a href="#<%=anst("anstID")%>
MaB
ASKER
I'm probably doing something wrong, not replacing something that needs to be replaced or so.....
but trying your second tip (Request.ServerVariables.. ..) I get the same result as before.
The first time I click one of the links it opens up a new window and navigates to the correct bookmark in that window. The links then works as desired in the new window but I don't want this new window to open at all.
This however works as I want:
.link {
cursor: pointer;
text-decoration: underline;
color: blue;
}
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')" target="_Self">B</a>
MaB
but trying your second tip (Request.ServerVariables..
The first time I click one of the links it opens up a new window and navigates to the correct bookmark in that window. The links then works as desired in the new window but I don't want this new window to open at all.
This however works as I want:
.link {
cursor: pointer;
text-decoration: underline;
color: blue;
}
<a class="link" onClick="self.location.hre
MaB
ASKER
Of course I should be able to remove the target="_Self" from that, just forgot it...
Request.ServerVariables("S CRIPT_NAME ") just puts the full path of the page there. How you were doing it originally is just fine too. But can't imagine why would it open in a new window only once and then behave normally!
Are you using frames? Is the base target set to something?
Are you using frames? Is the base target set to something?
ASKER
I'm not using frames and the base target is set to ..... _New (What the... I was positive I changed that to _Self!).
But that shouldn't matter anyway, the target inside the a tag should override the base target, shouldn't it?
I will try changing back to the non-javascript now when I've changed the base target back and see what I get as result...
But that shouldn't matter anyway, the target inside the a tag should override the base target, shouldn't it?
I will try changing back to the non-javascript now when I've changed the base target back and see what I get as result...
ASKER
....nope, that doesn't work. It still opens in a new window. Back to the javascript....
If you post the full code, i cld try out the same on my end...
ASKER
OK. It's rather much, and under work, and partly in swedish, but here you go:
<%@ Language=VBScript %>
<%response.buffer=true%>
<!--#include file="databas.asp" -->
<%
'öppna connection
Databas.Open strConn
%>
<%response.write("<html><h ead><title >Kalender< /title>")% >
<link rel="stylesheet" type="text/css" href="../../stylesheets/fr v.css">
<SCRIPT>
function refreshPeriodic() {
//Reload the page every 5 minutes
location.reload();
timerID = setTimeout("refreshPeriodi c()",30000 00);
}
timerID = setTimeout("refreshPeriodi c()",30000 00);
</SCRIPT>
<script>
window.onload = function ()
{
//addScrollSynchronization (document. getElement ById("div1 "), document.getElementById("d iv3"), "vertical");
addScrollSynchronization(d ocument.ge tElementBy Id("div2") , document.getElementById("d iv3"), "horizontal");
};
// This is a function that returns a function that is used
// in the event listener
function getOnScrollFunction(oEleme nt)
{
return function () {
if (oElement._scrollSyncDirec tion == "horizontal" || oElement._scrollSyncDirect ion == "both")
oElement.scrollLeft = event.srcElement.scrollLef t;
if (oElement._scrollSyncDirec tion == "vertical" || oElement._scrollSyncDirect ion == "both")
oElement.scrollTop = event.srcElement.scrollTop ;
};
}
// This function adds scroll syncronization for the fromElement to the toElement
// this means that the fromElement will be updated when the toElement is scrolled
function addScrollSynchronization(f romElement , toElement, direction)
{
removeScrollSynchronizatio n(fromElem ent);
fromElement._syncScroll = getOnScrollFunction(fromEl ement);
fromElement._scrollSyncDir ection = direction;
fromElement._syncTo = toElement;
toElement.attachEvent("ons croll", fromElement._syncScroll);
}
// removes the scroll synchronization for an element
function removeScrollSynchronizatio n(fromElem ent)
{
if (fromElement._syncTo != null)
fromElement._syncTo.detach Event("ons croll", fromElement._syncScroll);
fromElement._syncTo = null;;
fromElement._syncScroll = null;
fromElement._scrollSyncDir ection = null;
}
</script>
<%
today = Date()
week = DatePart("ww", today,0,0)
dayofyear = DatePart("y", today,0,0)
dayofweek = DatePart("w", today,0,0)
dayno = DatePart("d", today,0,0)
'weekfromdb = DatePart("ww", frv("startdate"),0,0)
'weekfromdb = week
'response.write(weekfromdb & "<br />")
'response.write(week & "<br />")
%>
<base target="_Self">
</head>
<body bgcolor="#FFFFFF" style="border: 1px dotted #CECECE">
<a name="top"></a>
<div class="nav">
<!--<a href="NyFrv.asp">Lägg till frånvaro!</a>-->
<%
searchval = "A"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">A</ a>
<%end if%>
<%
searchval = "B"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">B</ a>
<%end if%>
<%
searchval = "C"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">C</ a>
<%end if%>
<%
searchval = "D"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">D</ a>
<%end if%>
<%
searchval = "E"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">E</ a>
<%end if%>
<%
searchval = "F"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">F</ a>
<%end if%>
<%
searchval = "G"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">G</ a>
<%end if%>
<%
searchval = "H"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">H</ a>
<%end if%>
<%
searchval = "I"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">I</ a>
<%end if%>
<%
searchval = "J"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">J</ a>
<%end if%>
<%
searchval = "K"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">K</ a>
<%end if%>
<%
searchval = "L"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">L</ a>
<%end if%>
<%
searchval = "M"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">M</ a>
<%end if%>
<%
searchval = "N"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">N</ a>
<%end if%>
<%
searchval = "O"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">O</ a>
<%end if%>
<%
searchval = "P"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">P</ a>
<%end if%>
<%
searchval = "Q"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Q</ a>
<%end if%>
<%
searchval = "R"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">R</ a>
<%end if%>
<%
searchval = "S"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">S</ a>
<%end if%>
<%
searchval = "T"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">T</ a>
<%end if%>
<%
searchval = "U"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">U</ a>
<%end if%>
<%
searchval = "V"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">V</ a>
<%end if%>
<%
searchval = "W"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">W</ a>
<%end if%>
<%
searchval = "X"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">X</ a>
<%end if%>
<%
searchval = "Y"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Y</ a>
<%end if%>
<%
searchval = "Z"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Z</ a>
<%end if%>
<%
searchval = "Å"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Å</ a>
<%end if%>
<%
searchval = "Ä"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Ä</ a>
<%end if%>
<%
searchval = "Ö"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Ö</ a>
<%end if%>
</div>
<div id="div2">
<table border="0" style="border-bottom-style :double; border-bottom-color:#80000 0; border-collapse:collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<thead>
<tr height="25" class="lockrow">
<th style="border-bottom:2px double #800000; border-top-style: solid; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-top-width:1; " width="150" bgcolor="#CECECE" align="left" valign="top" nowrap><b> <%response. write ("Vecka: " & week)%></b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Mån</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Tis</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Ons</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Tor</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Fre</b></th>
</tr>
</thead>
</table>
</div>
<div id="div3">
<table cellspacing="0" cellpadding="5" border="0" style="border-collapse: collapse" bordercolor="#111111">
<tbody>
<%
'SQLstr = "SELECT * FROM Frvtid"
'set frv = Databas.execute(SQLstr)
SQLstr = "SELECT * FROM Anst order by enamn"
set anst = Databas.execute(SQLstr)
%>
<%Do Until anst.EOF%>
<tr id="<%=anst("anstID")%>">
<td style="border-style:solid; border-width: 1" align="left" valign="top" width="150" height="45" nowrap><span style="text-transform: capitalize; color: #800000"> <b><%=anst( "enamn")%> <%=a nst("fnamn ")%></b><b r /><%if anst("mail") <> "" then%> <a class="mail" href="mailto:<%=anst("mail ")%>">e-ma il</a><%en d if%><br /><%if anst("tel") <> "" then%> <%=anst("tel") %><br /><%end if%><%if anst("mobtel") <> "" then%> <%=anst("mobte l")%><br /><%end if%></td>
<td style="border-style:solid; border-width: 1" bgcolor="#FFFFCC" align="left" valign="top" width="150" height="45" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 1 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" align="left" valign="top" width="150" height="45" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 2 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" bgcolor="#FFFFCC" align="left" valign="top" width="150" height="45" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 3 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" align="left" valign="top" width="150" height="45" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 4 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" bgcolor="#FFFFCC" align="left" valign="top" width="150" height="45" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 5 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
</tr>
<%
anst.MoveNext
loop
%>
</tbody>
</table>
</div>
<%
'Rensa upp
frv.close
anst.close
Databas.close
set databas = Nothing
%></body></html>
<%@ Language=VBScript %>
<%response.buffer=true%>
<!--#include file="databas.asp" -->
<%
'öppna connection
Databas.Open strConn
%>
<%response.write("<html><h
<link rel="stylesheet" type="text/css" href="../../stylesheets/fr
<SCRIPT>
function refreshPeriodic() {
//Reload the page every 5 minutes
location.reload();
timerID = setTimeout("refreshPeriodi
}
timerID = setTimeout("refreshPeriodi
</SCRIPT>
<script>
window.onload = function ()
{
//addScrollSynchronization
addScrollSynchronization(d
};
// This is a function that returns a function that is used
// in the event listener
function getOnScrollFunction(oEleme
{
return function () {
if (oElement._scrollSyncDirec
oElement.scrollLeft = event.srcElement.scrollLef
if (oElement._scrollSyncDirec
oElement.scrollTop = event.srcElement.scrollTop
};
}
// This function adds scroll syncronization for the fromElement to the toElement
// this means that the fromElement will be updated when the toElement is scrolled
function addScrollSynchronization(f
{
removeScrollSynchronizatio
fromElement._syncScroll = getOnScrollFunction(fromEl
fromElement._scrollSyncDir
fromElement._syncTo = toElement;
toElement.attachEvent("ons
}
// removes the scroll synchronization for an element
function removeScrollSynchronizatio
{
if (fromElement._syncTo != null)
fromElement._syncTo.detach
fromElement._syncTo = null;;
fromElement._syncScroll = null;
fromElement._scrollSyncDir
}
</script>
<%
today = Date()
week = DatePart("ww", today,0,0)
dayofyear = DatePart("y", today,0,0)
dayofweek = DatePart("w", today,0,0)
dayno = DatePart("d", today,0,0)
'weekfromdb = DatePart("ww", frv("startdate"),0,0)
'weekfromdb = week
'response.write(weekfromdb
'response.write(week & "<br />")
%>
<base target="_Self">
</head>
<body bgcolor="#FFFFFF" style="border: 1px dotted #CECECE">
<a name="top"></a>
<div class="nav">
<!--<a href="NyFrv.asp">Lägg till frånvaro!</a>-->
<%
searchval = "A"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "B"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "C"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "D"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "E"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "F"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "G"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "H"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "I"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "J"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "K"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "L"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "M"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "N"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "O"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "P"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Q"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "R"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "S"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "T"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "U"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "V"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "W"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "X"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Y"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Z"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Å"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Ä"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Ö"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
</div>
<div id="div2">
<table border="0" style="border-bottom-style
<thead>
<tr height="25" class="lockrow">
<th style="border-bottom:2px double #800000; border-top-style: solid; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-top-width:1; " width="150" bgcolor="#CECECE" align="left" valign="top" nowrap><b> <%response.
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Mån</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Tis</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Ons</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Tor</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="150" nowrap>
<b> Fre</b></th>
</tr>
</thead>
</table>
</div>
<div id="div3">
<table cellspacing="0" cellpadding="5" border="0" style="border-collapse: collapse" bordercolor="#111111">
<tbody>
<%
'SQLstr = "SELECT * FROM Frvtid"
'set frv = Databas.execute(SQLstr)
SQLstr = "SELECT * FROM Anst order by enamn"
set anst = Databas.execute(SQLstr)
%>
<%Do Until anst.EOF%>
<tr id="<%=anst("anstID")%>">
<td style="border-style:solid;
<td style="border-style:solid;
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 1 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 2 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 3 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 4 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 5 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
</tr>
<%
anst.MoveNext
loop
%>
</tbody>
</table>
</div>
<%
'Rensa upp
frv.close
anst.close
Databas.close
set databas = Nothing
%></body></html>
ASKER
...and I'm playing around with an alternate layout too.......
<%@ Language=VBScript %>
<%response.buffer=true%>
<!--#include file="databas.asp" -->
<%
'öppna connection
Databas.Open strConn
%>
<%response.write("<html><h ead><title >Kalender< /title>")% >
<link rel="stylesheet" type="text/css" href="../../stylesheets/fr v.css">
<SCRIPT>
function refreshPeriodic() {
//Reload the page every 5 minutes
location.reload();
timerID = setTimeout("refreshPeriodi c()",30000 00);
}
timerID = setTimeout("refreshPeriodi c()",30000 00);
</SCRIPT>
<script>
window.onload = function ()
{
addScrollSynchronization(d ocument.ge tElementBy Id("div1") , document.getElementById("d iv3"), "vertical");
addScrollSynchronization(d ocument.ge tElementBy Id("div2") , document.getElementById("d iv3"), "horizontal");
};
// This is a function that returns a function that is used
// in the event listener
function getOnScrollFunction(oEleme nt)
{
return function () {
if (oElement._scrollSyncDirec tion == "horizontal" || oElement._scrollSyncDirect ion == "both")
oElement.scrollLeft = event.srcElement.scrollLef t;
if (oElement._scrollSyncDirec tion == "vertical" || oElement._scrollSyncDirect ion == "both")
oElement.scrollTop = event.srcElement.scrollTop ;
};
}
// This function adds scroll syncronization for the fromElement to the toElement
// this means that the fromElement will be updated when the toElement is scrolled
function addScrollSynchronization(f romElement , toElement, direction)
{
removeScrollSynchronizatio n(fromElem ent);
fromElement._syncScroll = getOnScrollFunction(fromEl ement);
fromElement._scrollSyncDir ection = direction;
fromElement._syncTo = toElement;
toElement.attachEvent("ons croll", fromElement._syncScroll);
}
// removes the scroll synchronization for an element
function removeScrollSynchronizatio n(fromElem ent)
{
if (fromElement._syncTo != null)
fromElement._syncTo.detach Event("ons croll", fromElement._syncScroll);
fromElement._syncTo = null;;
fromElement._syncScroll = null;
fromElement._scrollSyncDir ection = null;
}
</script>
<%
today = Date()
week = DatePart("ww", today,0,0)
dayofyear = DatePart("y", today,0,0)
dayofweek = DatePart("w", today,0,0)
dayno = DatePart("d", today,0,0)
'weekfromdb = DatePart("ww", frv("startdate"),0,0)
'weekfromdb = week
'response.write(weekfromdb & "<br />")
'response.write(week & "<br />")
%>
<base target="_Self">
</head>
<body bgcolor="#FFFFFF" style="border: 1px dotted #CECECE">
<a name="top" class="link" onClick="self.location.hre f('#fri')" >Fredag</a >
<div class="nav">
<!--<a href="NyFrv.asp">Lägg till frånvaro!</a>-->
<%
searchval = "A"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">A</ a>
<%end if%>
<%
searchval = "B"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">B</ a>
<%end if%>
<%
searchval = "C"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">C</ a>
<%end if%>
<%
searchval = "D"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">D</ a>
<%end if%>
<%
searchval = "E"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">E</ a>
<%end if%>
<%
searchval = "F"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">F</ a>
<%end if%>
<%
searchval = "G"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">G</ a>
<%end if%>
<%
searchval = "H"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">H</ a>
<%end if%>
<%
searchval = "I"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">I</ a>
<%end if%>
<%
searchval = "J"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">J</ a>
<%end if%>
<%
searchval = "K"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">K</ a>
<%end if%>
<%
searchval = "L"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">L</ a>
<%end if%>
<%
searchval = "M"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">M</ a>
<%end if%>
<%
searchval = "N"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">N</ a>
<%end if%>
<%
searchval = "O"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">O</ a>
<%end if%>
<%
searchval = "P"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">P</ a>
<%end if%>
<%
searchval = "Q"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Q</ a>
<%end if%>
<%
searchval = "R"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">R</ a>
<%end if%>
<%
searchval = "S"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">S</ a>
<%end if%>
<%
searchval = "T"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">T</ a>
<%end if%>
<%
searchval = "U"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">U</ a>
<%end if%>
<%
searchval = "V"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">V</ a>
<%end if%>
<%
searchval = "W"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">W</ a>
<%end if%>
<%
searchval = "X"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">X</ a>
<%end if%>
<%
searchval = "Y"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Y</ a>
<%end if%>
<%
searchval = "Z"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Z</ a>
<%end if%>
<%
searchval = "Å"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Å</ a>
<%end if%>
<%
searchval = "Ä"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Ä</ a>
<%end if%>
<%
searchval = "Ö"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre f('#<%=ans t("anstID" )%>')">Ö</ a>
<%end if%>
</div>
<table width="90%">
<tr>
<td align="left" valign="top">
<table border="0" style="border-bottom-style :double; border-bottom-color:#80000 0; border-collapse:collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<thead>
<tr height="25">
<th style="border-bottom:2px double #800000; border-top-style: solid; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-top-width:1; " width="150" bgcolor="#CECECE" align="left" valign="top" nowrap><b> <%response. write ("Vecka: " & week)%></b></th>
</tr>
</table>
</td>
<td align="left" valign="top">
<div id="div2">
<table border="0" style="border-bottom-style :double; border-bottom-color:#80000 0; border-collapse:collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr height="25">
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1; border-left-style:solid" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Mån</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Tis</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Ons</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Tor</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Fre</b></th>
</tr>
</thead>
</table>
</div>
</td>
</tr>
<tbody>
<td align="left" valign="top">
<div id="div1">
<table cellspacing="0" cellpadding="5" border="0" style="border-collapse: collapse" bordercolor="#111111">
<%
SQLstr = "SELECT * FROM Anst order by enamn"
set anstfirst = Databas.execute(SQLstr)
%>
<%Do Until anstfirst.EOF%>
<tr>
<td style="border-style:solid; border-width: 1" align="left" valign="top" width="150" height="60" nowrap><span style="text-transform: capitalize; color: #800000"> <b><%=anstf irst("enam n")%>  ;<%=anstfi rst("fnamn ")%></b><b r /><%if anstfirst("mail") <> "" then%> <a class="mail" href="mailto:<%=anstfirst( "mail")%>" >e-mail</a ><%end if%><br /><%if anstfirst("tel") <> "" then%> <%=anstfirst(" tel")%><br /><%end if%><%if anstfirst("mobtel") <> "" then%> <%=anstfirst(" mobtel")%> <br /><%end if%></td>
</tr>
<%
anstfirst.MoveNext
loop
%>
</table>
</div>
</td>
<td align="left" valign="top">
<div id="div3">
<table cellspacing="0" cellpadding="5" border="0" style="border-collapse: collapse" bordercolor="#111111">
<%
'SQLstr = "SELECT * FROM Frvtid"
'set frv = Databas.execute(SQLstr)
SQLstr = "SELECT * FROM Anst order by enamn"
set anst = Databas.execute(SQLstr)
%>
<%Do Until anst.EOF%>
<tr id="<%=anst("anstID")%>">
<td style="border-style:solid; border-width: 1" bgcolor="#FFFFCC" align="left" valign="top" width="300" height="60" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<a name="mon"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 1 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" align="left" valign="top" width="300" height="60" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<a name="tue"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 2 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" bgcolor="#FFFFCC" align="left" valign="top" width="300" height="60" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<a name="wed"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 3 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" align="left" valign="top" width="300" height="60" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<a name="thu"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 4 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid; border-width: 1" bgcolor="#FFFFCC" align="left" valign="top" width="300" height="60" bordercolorlight="#808080" bordercolordark="#111111" bordercolor="#111111" nowrap>
<a name="fri"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 5 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<% =Right("00 " & CStr(DatePart("n", frv("starttime"))),2)%>-<% =Right("00 " & CStr(DatePart("h", frv("endtime"))),2)%>:<%=R ight("00" & Cstr(DatePart("n", frv("endtime"))),2)%></em> <%=f rv("descri ption")%>< %end if%>
<%
frv.MoveNext
loop
%> </td>
</tr>
<%
anst.MoveNext
loop
%>
</tbody>
</table>
</div>
</td>
</tr>
</table>
<%
'Rensa upp
frv.close
anstfirst.close
anst.close
Databas.close
set databas = Nothing
%></body></html>
<%@ Language=VBScript %>
<%response.buffer=true%>
<!--#include file="databas.asp" -->
<%
'öppna connection
Databas.Open strConn
%>
<%response.write("<html><h
<link rel="stylesheet" type="text/css" href="../../stylesheets/fr
<SCRIPT>
function refreshPeriodic() {
//Reload the page every 5 minutes
location.reload();
timerID = setTimeout("refreshPeriodi
}
timerID = setTimeout("refreshPeriodi
</SCRIPT>
<script>
window.onload = function ()
{
addScrollSynchronization(d
addScrollSynchronization(d
};
// This is a function that returns a function that is used
// in the event listener
function getOnScrollFunction(oEleme
{
return function () {
if (oElement._scrollSyncDirec
oElement.scrollLeft = event.srcElement.scrollLef
if (oElement._scrollSyncDirec
oElement.scrollTop = event.srcElement.scrollTop
};
}
// This function adds scroll syncronization for the fromElement to the toElement
// this means that the fromElement will be updated when the toElement is scrolled
function addScrollSynchronization(f
{
removeScrollSynchronizatio
fromElement._syncScroll = getOnScrollFunction(fromEl
fromElement._scrollSyncDir
fromElement._syncTo = toElement;
toElement.attachEvent("ons
}
// removes the scroll synchronization for an element
function removeScrollSynchronizatio
{
if (fromElement._syncTo != null)
fromElement._syncTo.detach
fromElement._syncTo = null;;
fromElement._syncScroll = null;
fromElement._scrollSyncDir
}
</script>
<%
today = Date()
week = DatePart("ww", today,0,0)
dayofyear = DatePart("y", today,0,0)
dayofweek = DatePart("w", today,0,0)
dayno = DatePart("d", today,0,0)
'weekfromdb = DatePart("ww", frv("startdate"),0,0)
'weekfromdb = week
'response.write(weekfromdb
'response.write(week & "<br />")
%>
<base target="_Self">
</head>
<body bgcolor="#FFFFFF" style="border: 1px dotted #CECECE">
<a name="top" class="link" onClick="self.location.hre
<div class="nav">
<!--<a href="NyFrv.asp">Lägg till frånvaro!</a>-->
<%
searchval = "A"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "B"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "C"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "D"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "E"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "F"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "G"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "H"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "I"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "J"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "K"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "L"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "M"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "N"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "O"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "P"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Q"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "R"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "S"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "T"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "U"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "V"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "W"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "X"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Y"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Z"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Å"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Ä"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
<%
searchval = "Ö"
SQLstr = "SELECT anstID, enamn FROM Anst WHERE enamn LIKE '" & searchval & "%'"
set anst = Databas.execute(SQLstr)
if not(anst.eof and anst.bof) then
%>
<a class="link" onClick="self.location.hre
<%end if%>
</div>
<table width="90%">
<tr>
<td align="left" valign="top">
<table border="0" style="border-bottom-style
<thead>
<tr height="25">
<th style="border-bottom:2px double #800000; border-top-style: solid; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-top-width:1; " width="150" bgcolor="#CECECE" align="left" valign="top" nowrap><b> <%response.
</tr>
</table>
</td>
<td align="left" valign="top">
<div id="div2">
<table border="0" style="border-bottom-style
<tr height="25">
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1; border-left-style:solid" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Mån</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Tis</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Ons</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Tor</b></th>
<th style="border-bottom:2px double #800000; border-top-style: solid; border-right-style: solid; border-left-width:1; border-right-width:1; border-top-width:1" bgcolor="#CECECE" align="left" valign="top" width="300" nowrap>
<b> Fre</b></th>
</tr>
</thead>
</table>
</div>
</td>
</tr>
<tbody>
<td align="left" valign="top">
<div id="div1">
<table cellspacing="0" cellpadding="5" border="0" style="border-collapse: collapse" bordercolor="#111111">
<%
SQLstr = "SELECT * FROM Anst order by enamn"
set anstfirst = Databas.execute(SQLstr)
%>
<%Do Until anstfirst.EOF%>
<tr>
<td style="border-style:solid;
</tr>
<%
anstfirst.MoveNext
loop
%>
</table>
</div>
</td>
<td align="left" valign="top">
<div id="div3">
<table cellspacing="0" cellpadding="5" border="0" style="border-collapse: collapse" bordercolor="#111111">
<%
'SQLstr = "SELECT * FROM Frvtid"
'set frv = Databas.execute(SQLstr)
SQLstr = "SELECT * FROM Anst order by enamn"
set anst = Databas.execute(SQLstr)
%>
<%Do Until anst.EOF%>
<tr id="<%=anst("anstID")%>">
<td style="border-style:solid;
<a name="mon"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 1 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<a name="tue"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 2 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<a name="wed"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 3 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<a name="thu"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 4 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
<td style="border-style:solid;
<a name="fri"></a>
<em>
<%SQLstr = "SELECT * FROM Frvtid"
set frv = Databas.execute(SQLstr)%>
<%Do Until frv.EOF%>
<%weekfromdb = DatePart("ww", frv("startdate"),0,0)%>
<%dayfromdb = DatePart("w", frv("startdate"),0,0)%>
<%if anst("anstID") = frv("anstID") and weekfromdb = week and dayfromdb = 5 then%><%=Right("00" & CStr(DatePart("h", frv("starttime"))),2)%>:<%
<%
frv.MoveNext
loop
%> </td>
</tr>
<%
anst.MoveNext
loop
%>
</tbody>
</table>
</div>
</td>
</tr>
</table>
<%
'Rensa upp
frv.close
anstfirst.close
anst.close
Databas.close
set databas = Nothing
%></body></html>
ASKER
....and this is the stylesheet
.nav {
position: relative;
top: 0px;
left: 0px;
height: 30;
width: 100%;
font-family:Verdana;
font-size:0.8em;
color:#800000;
text-decoration:none;
font-weight:bold;
text-align:center
}
.mail {
text-transform: lowercase;
}
.lockrow {
position:relative;
top:expression(this.offset Parent.scr ollTop);
}
.link {
cursor: pointer;
text-decoration: underline;
color: blue;
}
#div1 {
overflow: hidden;
height: 308;
width: 150;
}
#div2 {
overflow: hidden;
width: 600;
}
#div3 {
overflow: auto;
width: 600;
height: 320;
border-bottom-style:double ;
border-bottom-width:3;
}
BODY {
font-family:Verdana;
font-size:10px;
color:#000033;
background-color:#ffffff;
scrollbar-base-color: #ebebeb;
scrollbar-face-color: #dfdfdf;
scrollbar-track-color: #ffffff;
scrollbar-arrow-color: #800000;
scrollbar-highlight-color: #efefef;
scrollbar-3dlight-color: #0C0C0C;
scrollbar-shadow-color: #000000;
scrollbar-darkshadow-color : #ffffff;
overflow: hidden;
}
th {
font-family:Verdana;
font-size:10px;
color:#000033;
}
td {
font-family:Verdana;
font-size:10px;
color:#000033;
}
a {
font-family: Verdana;
font-style: normal;
font-size: 10px;
}
a em {
font-family: Verdana;
font-style: normal;
font-size: 10px;
}
td em {
color: #000033;
font-family: Verdana;
font-size: 10px;
font-style: italic;
}
H1 {
font-family:Verdana;
font-size:12pt;
color:#800000;
font-weight:bold;
font-style: normal;
}
p {
color: #000033;
font-family: Verdana;
font-size: 10px;
font-weight: bold
}
.nav {
position: relative;
top: 0px;
left: 0px;
height: 30;
width: 100%;
font-family:Verdana;
font-size:0.8em;
color:#800000;
text-decoration:none;
font-weight:bold;
text-align:center
}
.mail {
text-transform: lowercase;
}
.lockrow {
position:relative;
top:expression(this.offset
}
.link {
cursor: pointer;
text-decoration: underline;
color: blue;
}
#div1 {
overflow: hidden;
height: 308;
width: 150;
}
#div2 {
overflow: hidden;
width: 600;
}
#div3 {
overflow: auto;
width: 600;
height: 320;
border-bottom-style:double
border-bottom-width:3;
}
BODY {
font-family:Verdana;
font-size:10px;
color:#000033;
background-color:#ffffff;
scrollbar-base-color: #ebebeb;
scrollbar-face-color: #dfdfdf;
scrollbar-track-color: #ffffff;
scrollbar-arrow-color: #800000;
scrollbar-highlight-color:
scrollbar-3dlight-color: #0C0C0C;
scrollbar-shadow-color: #000000;
scrollbar-darkshadow-color
overflow: hidden;
}
th {
font-family:Verdana;
font-size:10px;
color:#000033;
}
td {
font-family:Verdana;
font-size:10px;
color:#000033;
}
a {
font-family: Verdana;
font-style: normal;
font-size: 10px;
}
a em {
font-family: Verdana;
font-style: normal;
font-size: 10px;
}
td em {
color: #000033;
font-family: Verdana;
font-size: 10px;
font-style: italic;
}
H1 {
font-family:Verdana;
font-size:12pt;
color:#800000;
font-weight:bold;
font-style: normal;
}
p {
color: #000033;
font-family: Verdana;
font-size: 10px;
font-weight: bold
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If link is to the same page and anst("anstID") is a bookmark then use this...
<a target="_self" href="<%=Request.ServerVar