Allan Vebel wrote in dk.edb.internet.webdesign.html:
> Linda Møller skrev:
>
> > Jeg har en side, der ofte returnerer flere svar,
> > end der kan vises på én gang.
>
> Må vi se den?
Ja - selvfølgelig.
Jeg har forsøgt mig med den "indlejrede" tabel - men jeg kan ikke
få den til at spille med mit recordset. Som det er nu, får jeg en
tabel for hver enkelt række i recordsettet, hvilket er logisk
nok.
Jeg har så forsøgt, at lægge blokken
<%Do While Not rst.EOF
numberofselected = numberofselected + 1
idCustInstr=rst("CustInstrId")
idInstrument=rst("InstrumentId")
idCustOwner=rst("CustOwner")
%>
ind i tabellen lige efter linien
<div style="height:520px;width:100%;overflow:scroll;">
Men det giver mig følgende fejlmelding: Expected 'Loop'
<!--#INCLUDE FILE="include/validate_inc.asp"-->
<!--#INCLUDE FILE="include/header_inc.asp"-->
<!--#INCLUDE FILE="include/eventhistory_inc.asp"-->
<!--#INCLUDE FILE="include/opendbclient_inc.asp"-->
<HEAD>
<link rel="stylesheet" type="text/css" href="style/item.css">
</HEAD>
<%
SetLocale("da")
%>
<body>
<script>
'function ImgWin(adr) {
' newWin = window.open(adr,
'popwin','toolbar=no,directories=no,menubar=no,scrollbars=yes,sta
tus=no,resizable=0,width=0,height=0');
'}
</script>
<br>
<br>
<%
if Request.Form("itemno") <>"" then
%>
<!--#INCLUDE FILE="include/sp_inc.asp"-->
<!--#INCLUDE FILE="include/opendbserver2_inc.asp"-->
<%
sql="SELECT * " & _
"FROM Booking " & _
"WHERE custinstrid=" & Request.Form("CustInstrId") & " AND
webuserid=" & Request.Form("CustOwner")
' Response.write sql
rst2.Open sql,OBJdbConn
if not rst2.EOF then
rst2.movefirst
rst2.delete
rst2.UpdateBatch
rst2.Close
set rst2 = nothing
else
dim param1(20,2)
param1(0,0)="custinstrid"
param1(0,1)=Request.Form("CustInstrId")
param1(1,0)="instrumentId"
param1(1,1)=Request.Form("InstrumentId")
param1(2,0)="webuserId"
param1(2,1)=Request.Form("CustOwner")
CurrentBookingId=runsp("createBooking", param1)
end if
end if
%>
<%
sqlmain="SELECT CustInstr.id AS CustInstrId,
CustInstr.lastCalledDate, CustInstr.itemNo, Instrument.id AS
InstrumentId, Instrument.descr, Instrument.manufacturer,
Instrument.model, CaseItem.sEStatusId, Customer.ownedBy AS
CustOwner, Booking.id AS Bookingid" & _
" FROM (CaseItem RIGHT JOIN ((CustInstr INNER JOIN Customer ON
CustInstr.customerId = Customer.id) INNER JOIN Instrument ON
CustInstr.instrumentId = Instrument.id) ON CaseItem.custInstrId =
CustInstr.id) LEFT JOIN Booking ON CustInstr.id =
Booking.custinstrid" & _
" WHERE Not CustInstr.lastCalledDate = '01-01-1900' AND
CaseItem.sEStatusId Is Null AND " & session("RightToCust") & "
AND CustInstr.status =0" & _
" ORDER BY CustInstr.lastCalledDate DESC, CustInstr.itemaNo"
'Response.write sqlmain
rst.Open sqlmain,OBJdbConn
rst.MoveFirst
dim numberofselected
dim idCustInstr
dim idInstrument
dim idCustOwner
numberofselected = 0
idCustInstr = 0
idInstrument = 0
idCustOwner = 0
dim color
dim secondcolor
dim thirdcolor
%>
<%Do While Not rst.EOF
numberofselected = numberofselected + 1
idCustInstr=rst("CustInstrId")
idInstrument=rst("InstrumentId")
idCustOwner=rst("CustOwner")
%>
<table width="100%" border=2 cellspacing=2 cellpadding=2>
<tr>
<td width="15%" align="middle"><font size=4>
<%="Indkaldt dato:"%>
</td>
<td width="15%" align="left"><font size=4>
<%="Item nr."%>
</td>
<td width="15%" align="left">
<font size=4>
<%="Instrument:"%>
</td>
<td width="15%" align="left">
<font size=4>
<%="Fabrikat:"%>
</td>
<td width="15%" align="left">
<font size=4>
<%="Model:"%>
</td>
<td width="15%" align="left">
<font size=4>
<%="Status:"%>
</td>
</tr>
<table>
<div style="height:520px;width:100%;overflow:scroll;">
<tr>
<td width="15%" align=middle>
<input type=submit class="knapbredde-16"
value="<%=DateValue(rst("lastCalledDate"))%>" id=lastCalledDate
name=lastCalledDate>
</td>
<%if isnull(rst("BookingId")) then%>
<td width="15%" bgcolor=green> </td>
<%else%>
<td width="15%" bgcolor=blue> </td>
<%end if%>
</tr>
<%rst.movenext%>
</table>
</div>
</table>
<%
Response.write r
' Response.write idCustOwner
Loop
%>
</body>
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials