Nu har det blivit för mycket för min lilla hönshjärna :e
varför blir det dubbelt av alla?
mvh Jörgen :(
numcols=3
intCount = ubound(arrRecords,2)+1
numrows = ceil(intCount/numcols)
response.write "<TABLE>"
for j=1 to numrows
response.write "<TR>"
for z=1 to numcols
intCurPos=numrows*(z-1)+j
response.write "<TD width=""200"">"
if intCurPos>intCount then
response.write " "
else
For I = intStartID To ((intStartID + intPageSize) -1)
intId = arrRecords(0,I)
strHemsida = arrRecords(1,I)
strUrl = arrRecords(2,I)
strDescription = arrRecords(3,I)
dtePostDate = arrRecords(4,I)
intHit = arrRecords(5,I)
strCat = arrRecords(7,I)
Response.Write "<p> <a href="""&strUrl&""" target=""_blank""> " & strHemsida & "</a> ("& intHit &")<BR>"& strDescription &"</p>"
If I = UBound(arrRecords,2) Then Exit For
Next
end if
response.write "</TD>"
next
response.write "</TR>"
next
response.write "</TABLE>"
function ceil(dblValue)
intTest=int(dblValue)
if intTest<dblValue then
ceil=intTest+1
else
ceil=intTest
end if
end function
------------------
Varför bråka när man kan kramas?
Jag har kommit en bit på väg, nu ser koden ut enligt nedan. Det fungerar bra förutom att den börjar på fel post.
Från början såg for-slingan ut så här:
For I = intStartID To ((intStartID + intPageSize) -1)
Alltså vill jag ha in intStartId som startvärde i loopen, men lyckas inget vidare. Någon som har någon ide?
numcols=3
intCount= ((intStartID + intPageSize) -1) 'ubound(arrRecords,2)+1
numrows=ceil(intCount/numcols)
response.write "<TABLE>"
for j=1 to numrows
response.write "<TR>"
for i=1 to numcols
intCurPos=numrows*(i-1)+j
response.write "<TD>"
if intCurPos>intCount then
response.write " "
else
response.write "<p>"& arrRecords(0,intCurPos-1) &"<br>"& arrRecords(1,intCurPos-1) &"<br>"& arrRecords(2,intCurPos-1) &"<br>"
end if
response.write "</TD>"
next
response.write "</TR>"
next
response.write "</TABLE>"
function ceil(dblValue)
intTest=int(dblValue)
if intTest<dblValue then
ceil=intTest+1
else
ceil=intTest
end if
end function
------------------
Varför bråka när man kan kramas?