Avatar billede tblaster Nybegynder
06. november 2002 - 11:24 Der er 23 kommentarer og
1 løsning

Skrive Vent venligste ...

Er det muligt at lave så når man trykker på en submit knapper så skriver den vent venligst indtil at siden er klar?

Jeg bruger denne form:

<FORM METHOD="POST" ACTION="ok.asp" Id="Bookning" ;">
<input name="submit" type="submit" class="Button" value="Book Lokale">

Hvis det ikke er muligt er det så muligt på ok.asp siden at lave så den åbner siden med det samme og så skriver vent venligst og så når alle scriptsne er kørt så skriver den så at bookninger er gennemført?
Avatar billede Slettet bruger
06. november 2002 - 11:32 #1
den sidste løsning er jo bare at lave en response.redirect("din_side.asp")
til en tom side der står så er alle boolninger gennemført i slutningen af dit script.

mvh.
Questis.dk
Avatar billede tblaster Nybegynder
06. november 2002 - 11:35 #2
Det var ikke det jeg skulle have ... det jeg skal have er at den skriver vent venligst ... jeg har lavet så den skriver at alle booknigner er gennemført ... grunden til at jeg nævnte det var at hvis der var nogen der lavde en if med response.write så skal der jo ikke bliver ved med at stå vent venligst på siden!
Avatar billede Slettet bruger
06. november 2002 - 11:37 #3
su skrev hvis det ikke var muligt, og det gav jeg dig svaret på, kan jeg ikke se noget forkert i, men glem det find selv løsningen, gider ikke bruge mere tid på dette, har givet et muligt svar og det har jeg det fint med.... det virker i hvert fald
Avatar billede tblaster Nybegynder
06. november 2002 - 11:57 #4
questis ... hvordan vil du lige lave at den skriver vent venligst på siden? Hvis jeg bare smider det ind på siden og laver en response.redirect i bunden så udføre den kun den der response.redirect ...

Problemet er jo at den først viser siden når hele sidens script er gennemløbet ... jeg vil gerne have derfor at man får besked om at vente indtil den er færdig hvilket godt kan tage lidt tid!
Avatar billede Slettet bruger
06. november 2002 - 12:00 #5
ja, men siden laver ikke den response.redirect før at den har udført al den script som står ovenfor, derved kan du i starten af siden skrive vent venligts, og derefter køre dit asp kode og i slutningen laave en response.redirect til en side hvor der står gennemført
Avatar billede tblaster Nybegynder
06. november 2002 - 12:07 #6
Det har jeg prøvet ... som sagt så udføre den hele sidens kode inden den åbner siden ... derfor vil man bliver smidt direkte over til den siden den redirecter til :-(
Avatar billede mrbarnes Nybegynder
06. november 2002 - 12:19 #7
tblaster: du skal lave to sider, en side med vent og en side med scriptet... så kalder du vent siden fra din submit form og på vent siden kalder du scriptet side... det er det tblaster questis mener
Avatar billede tblaster Nybegynder
06. november 2002 - 12:38 #8
det har jeg prøvet med response.redirect men så når man ikke at se selve siden med vent venligst ... den sender en direkte vidre til ok.asp :-(
Avatar billede carpediem Nybegynder
06. november 2002 - 12:46 #9
Prøv med:
<%
Response.Buffer = True
Response.Write "Vent veligst..."
Response.Flush

'Dit Script

Response.Write "Dine bookninger er gennemført!"
Response.Flush
%>
Avatar billede mrbarnes Nybegynder
06. november 2002 - 12:57 #10
God ide carpediem.
Avatar billede tblaster Nybegynder
06. november 2002 - 13:16 #11
carpediem ... jeg syntes ikke de gør nogen forskel den viser det stadig først når det hele er klar :-(
Avatar billede tblaster Nybegynder
06. november 2002 - 13:19 #12
Er der mulighed for at lave så når man trykker på form knappen så skriver den bare vedsiden af at man skal vente et øjeblik?

<FORM METHOD="POST" ACTION="ok.asp" Id="Bookning" ;">
<input name="submit" type="submit" class="Button" value="Book Lokale">
Avatar billede carpediem Nybegynder
06. november 2002 - 13:31 #13
Det skulle altså gerne virke. Prøv lige med den her:
<% Response.Buffer = True %>
<%
Response.Write "Start<BR>"
Response.Flush
For i = 1 to 1000000
'    Response.Write i
'    Response.Flush
Next

Response.Write "Slut<BR>"
Response.Flush
%>
Avatar billede tblaster Nybegynder
06. november 2002 - 13:44 #14
Jeg kan ikke få det til at virke ... hvor vil du smide det i min kode?

<% Response.Buffer = True %>
<%
  If Not Session("auth_granted") = "true" Then
      Response.Redirect "../redirect.htm"
    Response.End
  End If

olddate = Date()
Dato = FormatDateTime(olddate, 1)
olddate = Date()
Dato1 = FormatDateTime(olddate, 2)
%>
<HTML>
<HEAD>
<TITLE>Booking af mødelokaler</TITLE>

</HEAD>
<style>
body {

    background : 000000;
    background-color: #FFFFFF;
    FONT-FAMILY: Tahoma, Arial, Verdana, Helvetica, sans-serif;
    FONT-SIZE: 8pt
    color: white;
    color: #000000;
    font-size: 10px;
    font-family: Tahoma;
   
    scrollbar-face-color: "#FFFFFF";
    scrollbar-shadow-color: "#FFFFFF";
    scrollbar-highlight-color: "#000000";
    scrollbar-3dlight-color: "#000000";
    scrollbar-darkshadow-color: "#000000";
    scrollbar-track-color: "#FFFFFF";
    scrollbar-arrow-color: "#000000";
   
}
    input, textarea, select, option {
        font-family: verdana;
        font-size: 10px;
        background: #FFFFFF;
        border:1px solid #111111;
        color: #000000;
}
TD
{
    COLOR: #000000; FONT-FAMILY: Times New Roman; FONT-SIZE: 12pt
}
SMALL
{
    FONT-SIZE: 8pt
}
A:link
{
    COLOR: #000033; TEXT-DECORATION: none
}
A:visited
{
    COLOR: #003333; TEXT-DECORATION: none
}
A:hover
{
    COLOR: #BFBFBF; TEXT-DECORATION: none
}
    </style>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 rightMargin=0>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
                    <TBODY>
                    <TR>
                      <TD width=582 bgColor=#000000><IMG height=1 alt=""
                        src="../pics/Design/blank(1).gif"
                        width=582 border=0><BR></TD>
                      <TD width=2 bgColor=#ffffff><IMG height=1 alt=""
                        src="../pics/Design/blank(1).gif"
                        width=2 border=0><BR></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0 height="70">
                    <TBODY>
                    <TR>
                      <TD vAlign=top align=left width=1 bgColor=#000000
                      height=27><IMG height=25 alt="" src="../pics/Design/blank.gif"
                        width=1 border=0><BR></TD>
                      <TD vAlign=top align=left width=5 bgColor=#608EC6
                      height=27><BR></TD>
                      <TD align=left width=565 bgColor=#608ec6
                      height=27>
    <font color="#FFFFFF" style="font-size: 12pt" face="Arial"><b>Bookning</b></font><BR></TD>
                      <TD vAlign=top align=left width=8
                      background=../pics/Design/content_right_top.gif height=27><BR></TD></TR>
                    <TR>
                      <TD vAlign=top align=left width=1 bgColor=#000000 height="17"><IMG
                        height=1 alt="" src="../pics/Design/black.gif" width=1
                      border=0></TD>
                      <TD vAlign=top align=left width=10 bgColor=#CFDFFC height="17">&nbsp;</TD>
                      <TD vAlign=top align=left width=565 bgColor=#CFDFFC
                      height=17>
                        <br>
<%
'Slå fejl raportering fra:
On Error Resume Next

bodyTxt = bodyTxt & "Lokale: " & Session("Lokale")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Dato: " & Session("Dato")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Initial: " & Session("auth_Initial")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Firma: " & Session("auth_Gruppenavn")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Fra: " & Session("tid")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Til: " & Session("Slut")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Dato for bestilling: " & Dato
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Samletpris: " & Session("Samletpris") & "kr"
bodyTxt = bodyTxt & VbCrLf

if Session("kommentar") <> "" then
  bodyTxt = bodyTxt & "Emne: " & Session("kommentar")
end if
bodyTxt = bodyTxt & VbCrLf
if Session("sagsnr") <> "" then
  bodyTxt = bodyTxt & "Sagsnr: " & Session("Sagsnr")
  bodyTxt = bodyTxt & VbCrLf
end if
if Session("antal") <> "" then
  bodyTxt = bodyTxt & "Antal: " & Session("antal")
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Skillevæg") <> "" Then
  bodyTxt = bodyTxt & Session("Skillevæg") & VbCrLf
end if
if Session("Bordopstilling") <> "" then
  bodyTxt = bodyTxt & "Bordopstilling: " & Session("bordopstilling")
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Kaffe") <> "" Or Session("The") <> "" Or Session("Formidagsbrød") <> "" Or Session("Eftermidagskage") <> "" Or Session("Skillevæg") <> "" Then
  bodyTxt = bodyTxt & "Kantineydelser:"
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Kaffe/The") <> "" Then
  bodyTxt = bodyTxt & Session("Kaffe/The") & VbCrLf
end if
If Session("Øl/vand") <> "" Then
  bodyTxt = bodyTxt & Session("Øl/vand") & VbCrLf
end if
If Session("Formidagsbrød") <> "" Then
  bodyTxt = bodyTxt & Session("Formidagsbrød") & VbCrLf
end if
If Session("Eftermidagskage") <> "" Then
  bodyTxt = bodyTxt & Session("Eftermidagskage") & VbCrLf
end if
If Session("Småkager") <> "" Then
  bodyTxt = bodyTxt & Session("Småkager") & VbCrLf
end if
If Session("andet") <> "" Then
  bodyTxt = bodyTxt & Session("andet") & VbCrLf
end if


set JMail = server.createobject("JMail.SMTPMail")
JMail.sender = "Autosender@hanveparken1vejle.dk"
JMail.SenderName = "Autosender"
JMail.subject = "Bookning af mødelokale"
JMail.AddRecipient "xxxxx@xxxxx.xxx"
JMail.ContentType = "text/plain"
JMail.body = bodyTxt
JMail.priority = 1
JMail.maildomain = "mail.havneparken1vejle.dk"
JMail.silent = true
JMail.execute
JMail.close()

Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
Conn.Open "DBQ=" & Server.Mappath("../../db/Booking.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};Password=1234;"

sSQL = "SELECT * FROM booking"
rs.Open sSQL, Conn,1,3

startTid = Session("tid")
do while CDate(startTid) <= CDate(Session("Slut"))
  tider = tider & "," & formatdatetime(CDate(startTid),4)
  startTid = DateAdd("n",30,startTid) 
loop
if tider <> "" then tider = Mid(tider,2)

For EACH tid In Split(tider, ",")
    rs.AddNew
    rs("tid") = tid
        rs("dato") = Session("datobestil")
    rs("oprettet") = Dato1
    rs("lokalenr") = Session("Id")
    rs("firma") = Session("auth_Gruppenavn")
    rs("initialer") = Session("auth_Initial")
    rs("kommentar") = Session("kommentar")
    rs("samletpris") = Session("Samletpris")
    rs("sagsnr") = Session("Sagsnr")
    rs("antal") = Session("antal")
    rs("bordopstilling") = Session("bordopstilling")
    rs.update
Next

'Tjek om der har være fejl
if err then
  Response.write "Det opstod en fejl på siden. Prøv at starte din bookning forfra."
else
  Response.write "Bookningen er registræret!"
end if

%>
            &nbsp;</TD>
                      <TD vAlign=top align=left width=8
                      background=../pics/Design/content_right_middle.gif
                        rowSpan=2 height="43">&nbsp;</TD></TR>
                    <TR>
                      <TD vAlign=bottom align=left width=564 bgColor=#CFDFFC
                      colSpan=3 height="26"><IMG height=26 alt=""
                        src="../pics/Design/newsitem_left_bottom.gif" width=56
                      border=0></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
                    <TBODY>
                    <TR>
                      <TD width=26 bgColor=#ffffff><IMG height=15 alt=""
                        src="../pics/Design/content_left_bottom.gif"
                        width=26 border=0><BR></TD>
                      <TD width=554 bgColor=#FFFFFF><IMG height=15 alt=""
                        src="../pics/Design/content_bottom.gif"
                        width=558 border=0><BR></TD>
                      <TD width=2 bgColor=#ffffff><IMG height=1 alt=""
                        src="../pics/Design/blank(1).gif"
                        width=2 border=0><BR></TD></TR></TBODY></TABLE>
               
</BODY></HTML>
Avatar billede carpediem Nybegynder
06. november 2002 - 15:25 #15
Havde lige lidt svært ved at gennemskue din kode men prøv:
<% Response.Buffer = True %>
<%
  If Not Session("auth_granted") = "true" Then
      Response.Redirect "../redirect.htm"
    Response.End
  End If

olddate = Date()
Dato = FormatDateTime(olddate, 1)
olddate = Date()
Dato1 = FormatDateTime(olddate, 2)
%>
<HTML>
<HEAD>
<TITLE>Booking af mødelokaler</TITLE>

</HEAD>
<style>
body {

    background : 000000;
    background-color: #FFFFFF;
    FONT-FAMILY: Tahoma, Arial, Verdana, Helvetica, sans-serif;
    FONT-SIZE: 8pt
    color: white;
    color: #000000;
    font-size: 10px;
    font-family: Tahoma;
   
    scrollbar-face-color: "#FFFFFF";
    scrollbar-shadow-color: "#FFFFFF";
    scrollbar-highlight-color: "#000000";
    scrollbar-3dlight-color: "#000000";
    scrollbar-darkshadow-color: "#000000";
    scrollbar-track-color: "#FFFFFF";
    scrollbar-arrow-color: "#000000";
   
}
    input, textarea, select, option {
        font-family: verdana;
        font-size: 10px;
        background: #FFFFFF;
        border:1px solid #111111;
        color: #000000;
}
TD
{
    COLOR: #000000; FONT-FAMILY: Times New Roman; FONT-SIZE: 12pt
}
SMALL
{
    FONT-SIZE: 8pt
}
A:link
{
    COLOR: #000033; TEXT-DECORATION: none
}
A:visited
{
    COLOR: #003333; TEXT-DECORATION: none
}
A:hover
{
    COLOR: #BFBFBF; TEXT-DECORATION: none
}
    </style>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 rightMargin=0>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
                    <TBODY>
                    <TR>
                      <TD width=582 bgColor=#000000><IMG height=1 alt="" src="../pics/Design/blank(1).gif" width=582 border=0><BR></TD>
                      <TD width=2 bgColor=#ffffff><IMG height=1 alt="" src="../pics/Design/blank(1).gif" width=2 border=0><BR></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0 height="70">
                    <TBODY>
                    <TR>
                      <TD vAlign=top align=left width=1 bgColor=#000000 height=27>
                        <IMG height=25 alt="" src="../pics/Design/blank.gif" width=1 border=0><BR></TD>
                      <TD vAlign=top align=left width=5 bgColor=#608EC6
                      height=27><BR></TD>
                      <TD align=left width=565 bgColor=#608ec6
                      height=27>
    <font color="#FFFFFF" style="font-size: 12pt" face="Arial"><b>Bookning</b></font><BR></TD>
                      <TD vAlign=top align=left width=8
                      background=../pics/Design/content_right_top.gif height=27><BR></TD></TR>
                    <TR>
                      <TD vAlign=top align=left width=1 bgColor=#000000 height="17"><IMG
                        height=1 alt="" src="../pics/Design/black.gif" width=1
                      border=0></TD>
                      <TD vAlign=top align=left width=10 bgColor=#CFDFFC height="17">&nbsp;</TD>
                      <TD vAlign=top align=left width=565 bgColor=#CFDFFC
                      height=17>
                        <br>
<%

'Udskriver alt hvad der er i memory
Response.Write "Vent venligst imens mødet bookes...<BR>
Response.Flush

'Slå fejl raportering fra:
On Error Resume Next

bodyTxt = bodyTxt & "Lokale: " & Session("Lokale")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Dato: " & Session("Dato")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Initial: " & Session("auth_Initial")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Firma: " & Session("auth_Gruppenavn")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Fra: " & Session("tid")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Til: " & Session("Slut")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Dato for bestilling: " & Dato
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Samletpris: " & Session("Samletpris") & "kr"
bodyTxt = bodyTxt & VbCrLf

if Session("kommentar") <> "" then
  bodyTxt = bodyTxt & "Emne: " & Session("kommentar")
end if
bodyTxt = bodyTxt & VbCrLf
if Session("sagsnr") <> "" then
  bodyTxt = bodyTxt & "Sagsnr: " & Session("Sagsnr")
  bodyTxt = bodyTxt & VbCrLf
end if
if Session("antal") <> "" then
  bodyTxt = bodyTxt & "Antal: " & Session("antal")
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Skillevæg") <> "" Then
  bodyTxt = bodyTxt & Session("Skillevæg") & VbCrLf
end if
if Session("Bordopstilling") <> "" then
  bodyTxt = bodyTxt & "Bordopstilling: " & Session("bordopstilling")
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Kaffe") <> "" Or Session("The") <> "" Or Session("Formidagsbrød") <> "" Or Session("Eftermidagskage") <> "" Or Session("Skillevæg") <> "" Then
  bodyTxt = bodyTxt & "Kantineydelser:"
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Kaffe/The") <> "" Then
  bodyTxt = bodyTxt & Session("Kaffe/The") & VbCrLf
end if
If Session("Øl/vand") <> "" Then
  bodyTxt = bodyTxt & Session("Øl/vand") & VbCrLf
end if
If Session("Formidagsbrød") <> "" Then
  bodyTxt = bodyTxt & Session("Formidagsbrød") & VbCrLf
end if
If Session("Eftermidagskage") <> "" Then
  bodyTxt = bodyTxt & Session("Eftermidagskage") & VbCrLf
end if
If Session("Småkager") <> "" Then
  bodyTxt = bodyTxt & Session("Småkager") & VbCrLf
end if
If Session("andet") <> "" Then
  bodyTxt = bodyTxt & Session("andet") & VbCrLf
end if


set JMail = server.createobject("JMail.SMTPMail")
JMail.sender = "Autosender@hanveparken1vejle.dk"
JMail.SenderName = "Autosender"
JMail.subject = "Bookning af mødelokale"
JMail.AddRecipient "xxxxx@xxxxx.xxx"
JMail.ContentType = "text/plain"
JMail.body = bodyTxt
JMail.priority = 1
JMail.maildomain = "mail.havneparken1vejle.dk"
JMail.silent = true
JMail.execute
JMail.close()

Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
Conn.Open "DBQ=" & Server.Mappath("../../db/Booking.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};Password=1234;"

sSQL = "SELECT * FROM booking"
rs.Open sSQL, Conn,1,3

startTid = Session("tid")
do while CDate(startTid) <= CDate(Session("Slut"))
  tider = tider & "," & formatdatetime(CDate(startTid),4)
  startTid = DateAdd("n",30,startTid) 
loop
if tider <> "" then tider = Mid(tider,2)

For EACH tid In Split(tider, ",")
    rs.AddNew
    rs("tid") = tid
        rs("dato") = Session("datobestil")
    rs("oprettet") = Dato1
    rs("lokalenr") = Session("Id")
    rs("firma") = Session("auth_Gruppenavn")
    rs("initialer") = Session("auth_Initial")
    rs("kommentar") = Session("kommentar")
    rs("samletpris") = Session("Samletpris")
    rs("sagsnr") = Session("Sagsnr")
    rs("antal") = Session("antal")
    rs("bordopstilling") = Session("bordopstilling")
    rs.update
Next

'Tjek om der har være fejl
if err then
  Response.write "Det opstod en fejl på siden. Prøv at starte din bookning forfra."
else
  Response.write "Bookningen er registræret!"
end if

'Udskriver alt hvad der er i buffer
Response.Buffer

%>
            &nbsp;</TD>
                      <TD vAlign=top align=left width=8
                      background=../pics/Design/content_right_middle.gif
                        rowSpan=2 height="43">&nbsp;</TD></TR>
                    <TR>
                      <TD vAlign=bottom align=left width=564 bgColor=#CFDFFC
                      colSpan=3 height="26"><IMG height=26 alt=""
                        src="../pics/Design/newsitem_left_bottom.gif" width=56
                      border=0></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
                    <TBODY>
                    <TR>
                      <TD width=26 bgColor=#ffffff><IMG height=15 alt=""
                        src="../pics/Design/content_left_bottom.gif"
                        width=26 border=0><BR></TD>
                      <TD width=554 bgColor=#FFFFFF><IMG height=15 alt=""
                        src="../pics/Design/content_bottom.gif"
                        width=558 border=0><BR></TD>
                      <TD width=2 bgColor=#ffffff><IMG height=1 alt=""
                        src="../pics/Design/blank(1).gif"
                        width=2 border=0><BR></TD></TR></TBODY></TABLE>
               
</BODY></HTML>
Avatar billede carpediem Nybegynder
06. november 2002 - 15:27 #16
Ups. En mindre fejl:

<% Response.Buffer = True %>
<%
  If Not Session("auth_granted") = "true" Then
      Response.Redirect "../redirect.htm"
    Response.End
  End If

olddate = Date()
Dato = FormatDateTime(olddate, 1)
olddate = Date()
Dato1 = FormatDateTime(olddate, 2)
%>
<HTML>
<HEAD>
<TITLE>Booking af mødelokaler</TITLE>

</HEAD>
<style>
body {

    background : 000000;
    background-color: #FFFFFF;
    FONT-FAMILY: Tahoma, Arial, Verdana, Helvetica, sans-serif;
    FONT-SIZE: 8pt
    color: white;
    color: #000000;
    font-size: 10px;
    font-family: Tahoma;
   
    scrollbar-face-color: "#FFFFFF";
    scrollbar-shadow-color: "#FFFFFF";
    scrollbar-highlight-color: "#000000";
    scrollbar-3dlight-color: "#000000";
    scrollbar-darkshadow-color: "#000000";
    scrollbar-track-color: "#FFFFFF";
    scrollbar-arrow-color: "#000000";
   
}
    input, textarea, select, option {
        font-family: verdana;
        font-size: 10px;
        background: #FFFFFF;
        border:1px solid #111111;
        color: #000000;
}
TD
{
    COLOR: #000000; FONT-FAMILY: Times New Roman; FONT-SIZE: 12pt
}
SMALL
{
    FONT-SIZE: 8pt
}
A:link
{
    COLOR: #000033; TEXT-DECORATION: none
}
A:visited
{
    COLOR: #003333; TEXT-DECORATION: none
}
A:hover
{
    COLOR: #BFBFBF; TEXT-DECORATION: none
}
    </style>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 rightMargin=0>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
                    <TBODY>
                    <TR>
                      <TD width=582 bgColor=#000000><IMG height=1 alt="" src="../pics/Design/blank(1).gif" width=582 border=0><BR></TD>
                      <TD width=2 bgColor=#ffffff><IMG height=1 alt="" src="../pics/Design/blank(1).gif" width=2 border=0><BR></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0 height="70">
                    <TBODY>
                    <TR>
                      <TD vAlign=top align=left width=1 bgColor=#000000 height=27>
                        <IMG height=25 alt="" src="../pics/Design/blank.gif" width=1 border=0><BR></TD>
                      <TD vAlign=top align=left width=5 bgColor=#608EC6
                      height=27><BR></TD>
                      <TD align=left width=565 bgColor=#608ec6
                      height=27>
    <font color="#FFFFFF" style="font-size: 12pt" face="Arial"><b>Bookning</b></font><BR></TD>
                      <TD vAlign=top align=left width=8
                      background=../pics/Design/content_right_top.gif height=27><BR></TD></TR>
                    <TR>
                      <TD vAlign=top align=left width=1 bgColor=#000000 height="17"><IMG
                        height=1 alt="" src="../pics/Design/black.gif" width=1
                      border=0></TD>
                      <TD vAlign=top align=left width=10 bgColor=#CFDFFC height="17">&nbsp;</TD>
                      <TD vAlign=top align=left width=565 bgColor=#CFDFFC
                      height=17>
                        <br>
<%

'Udskriver alt hvad der er i memory
Response.Write "Vent venligst imens mødet bookes...<BR>
Response.Flush

'Slå fejl raportering fra:
On Error Resume Next

bodyTxt = bodyTxt & "Lokale: " & Session("Lokale")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Dato: " & Session("Dato")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Initial: " & Session("auth_Initial")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Firma: " & Session("auth_Gruppenavn")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Fra: " & Session("tid")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Til: " & Session("Slut")
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Dato for bestilling: " & Dato
bodyTxt = bodyTxt & VbCrLf
bodyTxt = bodyTxt & "Samletpris: " & Session("Samletpris") & "kr"
bodyTxt = bodyTxt & VbCrLf

if Session("kommentar") <> "" then
  bodyTxt = bodyTxt & "Emne: " & Session("kommentar")
end if
bodyTxt = bodyTxt & VbCrLf
if Session("sagsnr") <> "" then
  bodyTxt = bodyTxt & "Sagsnr: " & Session("Sagsnr")
  bodyTxt = bodyTxt & VbCrLf
end if
if Session("antal") <> "" then
  bodyTxt = bodyTxt & "Antal: " & Session("antal")
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Skillevæg") <> "" Then
  bodyTxt = bodyTxt & Session("Skillevæg") & VbCrLf
end if
if Session("Bordopstilling") <> "" then
  bodyTxt = bodyTxt & "Bordopstilling: " & Session("bordopstilling")
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Kaffe") <> "" Or Session("The") <> "" Or Session("Formidagsbrød") <> "" Or Session("Eftermidagskage") <> "" Or Session("Skillevæg") <> "" Then
  bodyTxt = bodyTxt & "Kantineydelser:"
  bodyTxt = bodyTxt & VbCrLf
end if
If Session("Kaffe/The") <> "" Then
  bodyTxt = bodyTxt & Session("Kaffe/The") & VbCrLf
end if
If Session("Øl/vand") <> "" Then
  bodyTxt = bodyTxt & Session("Øl/vand") & VbCrLf
end if
If Session("Formidagsbrød") <> "" Then
  bodyTxt = bodyTxt & Session("Formidagsbrød") & VbCrLf
end if
If Session("Eftermidagskage") <> "" Then
  bodyTxt = bodyTxt & Session("Eftermidagskage") & VbCrLf
end if
If Session("Småkager") <> "" Then
  bodyTxt = bodyTxt & Session("Småkager") & VbCrLf
end if
If Session("andet") <> "" Then
  bodyTxt = bodyTxt & Session("andet") & VbCrLf
end if


set JMail = server.createobject("JMail.SMTPMail")
JMail.sender = "Autosender@hanveparken1vejle.dk"
JMail.SenderName = "Autosender"
JMail.subject = "Bookning af mødelokale"
JMail.AddRecipient "xxxxx@xxxxx.xxx"
JMail.ContentType = "text/plain"
JMail.body = bodyTxt
JMail.priority = 1
JMail.maildomain = "mail.havneparken1vejle.dk"
JMail.silent = true
JMail.execute
JMail.close()

Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
Conn.Open "DBQ=" & Server.Mappath("../../db/Booking.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};Password=1234;"

sSQL = "SELECT * FROM booking"
rs.Open sSQL, Conn,1,3

startTid = Session("tid")
do while CDate(startTid) <= CDate(Session("Slut"))
  tider = tider & "," & formatdatetime(CDate(startTid),4)
  startTid = DateAdd("n",30,startTid) 
loop
if tider <> "" then tider = Mid(tider,2)

For EACH tid In Split(tider, ",")
    rs.AddNew
    rs("tid") = tid
        rs("dato") = Session("datobestil")
    rs("oprettet") = Dato1
    rs("lokalenr") = Session("Id")
    rs("firma") = Session("auth_Gruppenavn")
    rs("initialer") = Session("auth_Initial")
    rs("kommentar") = Session("kommentar")
    rs("samletpris") = Session("Samletpris")
    rs("sagsnr") = Session("Sagsnr")
    rs("antal") = Session("antal")
    rs("bordopstilling") = Session("bordopstilling")
    rs.update
Next

'Tjek om der har være fejl
if err then
  Response.write "Det opstod en fejl på siden. Prøv at starte din bookning forfra."
else
  Response.write "Bookningen er registræret!"
end if

'Udskriver alt hvad der er i buffer
Response.Flush

%>
            &nbsp;</TD>
                      <TD vAlign=top align=left width=8
                      background=../pics/Design/content_right_middle.gif
                        rowSpan=2 height="43">&nbsp;</TD></TR>
                    <TR>
                      <TD vAlign=bottom align=left width=564 bgColor=#CFDFFC
                      colSpan=3 height="26"><IMG height=26 alt=""
                        src="../pics/Design/newsitem_left_bottom.gif" width=56
                      border=0></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
                    <TBODY>
                    <TR>
                      <TD width=26 bgColor=#ffffff><IMG height=15 alt=""
                        src="../pics/Design/content_left_bottom.gif"
                        width=26 border=0><BR></TD>
                      <TD width=554 bgColor=#FFFFFF><IMG height=15 alt=""
                        src="../pics/Design/content_bottom.gif"
                        width=558 border=0><BR></TD>
                      <TD width=2 bgColor=#ffffff><IMG height=1 alt=""
                        src="../pics/Design/blank(1).gif"
                        width=2 border=0><BR></TD></TR></TBODY></TABLE>
               
</BODY></HTML>

Du skal dog ikke forvente, at det virker ordentligt i netscape
Avatar billede tblaster Nybegynder
06. november 2002 - 16:40 #17
jeg har lige prøvet det du skrev ... nu åbner den siden med det samme og viser lige den første streg af min tabel og så venter den altså til det hele er kørt inden den gør tabellen færdig og skriver Vent venligst imens mødet bookes... og
Bookningen er registræret!
Avatar billede carpediem Nybegynder
06. november 2002 - 16:53 #18
Der er en lille fejl her:

'Udskriver alt hvad der er i memory
Response.Write "Vent venligst imens mødet bookes...<BR>
Response.Flush

Skulle være:

'Udskriver alt hvad der er i memory
Response.Write "Vent venligst imens mødet bookes...<BR>"
Response.Flush

Ved ikke om du har set den?
Avatar billede tblaster Nybegynder
06. november 2002 - 16:57 #19
Jo det har jeg set ... ellers ville den ikke køre siden!
Avatar billede carpediem Nybegynder
06. november 2002 - 17:03 #20
Det kan tænkes, at det er fordi det simpelt hen går for stærkt imellem response.Write og response.flush
Prøv en ikke særlig køn metode:

'Udskriver alt hvad der er i memory
Response.Write "Vent venligst imens mødet bookes...<BR>"
For i = 1 to 10
  'Skal bare lige bruge lidt tid
Next
Response.Flush

Og hvis det ikke virker, så prøv at sætte den sidste værdi op til 100. Hvis du når 1000000 og det stadig ikke virker, så er det sikkert ikke derfor.
Avatar billede tblaster Nybegynder
06. november 2002 - 17:14 #21
Det gør ingen forskel :-(
Avatar billede tblaster Nybegynder
06. november 2002 - 18:03 #22
Tak for din hjælp carpediem ... fik det lavet på en anden måde!
Avatar billede jhammer Nybegynder
13. januar 2003 - 14:32 #23
tblaster:
Du kunne da godt lige ofre lidt tid på at skrive hvordan du løste dette!

Det er jo meningen at vi andre også skal lære lidt. Tilfældigvis har jeg nu et problem, der er fuldstændig magen til dit, så ...
Avatar billede tblaster Nybegynder
13. januar 2003 - 20:25 #24
Jo undskyld ... her er hvad jeg kom frem til:

<FORM METHOD="POST" ACTION="ok.asp" Id="Bookning" ;">
<input name="submit" type="submit" class="Button" value="Book Lokale" onclick="document.getElementById('ventspan').style.display='inline'" />
<input name="tilbage" type="button" class="Button" value="Tilbage" onclick="java script:history.back(-1)" />
<span id="ventspan" style="display: none;">Vent venligst ...</span>

Så simpel kan det laves!
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
Kurser inden for grundlæggende programmering

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



IT-JOB

Udviklings- og Forenklingsstyrelsen

Service Delivery Managers til bolig- og ejendomsdata

SporingsGruppen ApS

App-udvikler

Cognizant Technology Solutions Denmark ApS

Test Architect - Projects