Hi
Ron
It still is the same the bottom right is missing I can't see any 5's to
change only 3's and 1's how do you acheave 15
http://www.paulcmilner.co.uk/art/default.asp?search=%&page=2
Thanks
Paul M
Change the code to: (Eliminates unused header row)
<%
Dim image_source
image_source =("thumbs/")
%>
<table border="1">
<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
if ii mod 3 = 1 then
if ii>1 then response.write "</tr>" end if
%>
<tr>
<%
end if
ii = ii + 1
%>
<td><img alt="" src="<% = image_source &
rstSearch.Fields("image_number").Value & ".jpg" %>"><br><br><%=
rstSearch.Fields("image_name").Value %></td>
<% rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<td> </td> <!-- This line was missing from your version -->
<%
ii = ii+1
Loop
%>
</tr>
</table>
To get 5 rows of results change the script to return 15 results per
page,
not 5 as it does now.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
http://www.rxs-enterprises.org/fp
Hi
Ron it's me again
I am having problems filling all of the cells. Please take a look, the
bottom right cell is not been created and I also would like to have
at
least 5 rows vertically of three across I have tried to mess with the
numbers in the code for ages but to no avail
Thanks
Paul M
http://www.paulcmilner.co.uk/art/default.asp?search=%&page=3
here is the code I have so far
<table border="1">
<th colspan="3"></th>
<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
if ii mod 3 = 1 then %>
</tr><tr>
<%
end if
ii = ii + 1
%>
<%
Dim image_source
image_source =("thumbs/")
%>
<td><img src="<% = image_source %><% =
rstSearch.Fields("image_number").Value & ".jpg" %>"><br><br><%=
rstSearch.Fields("image_name").Value %></td>
<%
rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<%
ii = ii+1
Loop
%>
</tr>
</table>
Thanks Ron for your help and patience I have learnt loads from this
master
class
Best wishes
Paul M
If "sales" is an image then the display could be strange,
especially
if
the names are of different lengths - some may take up more lines
than
others.
It is fairly simple to display images all the same height - make
them
all
the same size, but only specify height in the image tag, but you
can't
easily fit all names in the same space.
To overcome this the easiest way is to use your new code (tidied up
a
little), but swap the image and names around:
<table border="1">
<th colspan="3">Sales</th>
<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage =
iPageCurrent
if ii mod 3 = 1 then %>
</tr><tr>
<%
end if
ii = ii + 1
%>
<td><%= rstSearch.Fields("sales").Value %><br><br><%=
rstSearch.Fields("first_name").Value %><%=
rstSearch.Fields("last_name").Value %></td>
<%
rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<td> </td>
<%
ii = ii+1
Loop
%>
</tr>
</table>
To have names above the sales and keep an even looking display will
require getting each row of 3 results into an array, then writing
out
the
array as 2 table rows - one row for names, the other for sales,
then
using CSS to remove/set appropriate cell borders.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
http://www.rxs-enterprises.org/fp
Hi Ron
I have persevered and come up with removing the sales from the TH
and
adding
p tags in the code to created another line is this a good way to
do
things? I know it looks a little strange but it is the effect I
want
before
adding images to the fields instead of First_names etc to create
an
image
gallery
here is the code
Thanks
Paul M
<table border="1">
<tr>
<th>Name</th>
<th></th>
<th>Name</th>
<th></th>
<th>Name</th>
<th></th>
<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage =
iPageCurrent
if ii mod 3 = 1 then %>
</tr>
<tr>
<%
end if
ii = ii + 1
%>
<td><%= rstSearch.Fields("first_name").Value %><%=
rstSearch.Fields("last_name").Value %><p></p><%=
rstSearch.Fields("sales").Value %></td>
<td></td>
<%
rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<td> </td><td> </td>
<%
ii = ii+1
Loop
%>
</tr>
</table>
Hi
Ron I am now trying to put the sales under the persons name
instead
of to
the right. I have tried different ways but I can't seem to get
it
I am most gratefull for your help
Paul M
Dear Ron
Thankyou! Thankyou! Thankyou!
All day I have playing with this I think I have seen just about
every
error statament from the asp error portfolio
Best wishes
Paul M
<table border="1">
<tr>
<th>Name</th>
<th>Sales</th>
<th>Name</th>
<th>Sales</th>
<th>Name</th>
<th>Sales</th>
<%
ii=1
Do While Not rstSearch.EOF And rstSearch.AbsolutePage =
iPageCurrent
if ii mod 3 = 1 then %>
</tr>
<tr>
<%
end if
ii = ii + 1
%>
<td><%= rstSearch.Fields("first_name").Value %> <%=
rstSearch.Fields("last_name").Value %></td>
<td><%= rstSearch.Fields("sales").Value %></td>
<%
rstSearch.MoveNext
Loop
Do while (ii mod 3)<>1 %>
<td> </td><td> </td>
<%
ii = ii+1
Loop
%>
</tr>
</table>
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
http://www.rxs-enterprises.org/fp
Hi
I can't get my head around this is. for a start I need
incorporate
a
search.
I have already done this but just need to display three
accross
at
a
time.
Is there anyway of modifying my existing table to display
three
in
a
row?
Paul M
Hi
Or do I need an array?
Paul M
Thanks Stefan
In the code it says
' You'd probably get this info from a database or an XML
file
or
' something like that, but the source will vary based on
your
' situation so I'm just loading the array manually.
arrPhotoNames = Array("09922491", "09999118", "10047069",
"19079112", _
"19124507", "19151069", "19297986",
"22474694",
_
"22475208", "24231229", "30423914",
"31931795")
arrPhotoTitles = Array("Freeway", "Symbology", "Ladies
Night", _
"You Are So Fired", "A Charming
Hangover",
_
"Pay the Man", "Give Yourself A
Hand",
_
"Stack", "The Office", "aVoid", _
"Spring Into Action", "Home
Improvement")
How do I get a record into an array from a dayabase I
have
ste
up
a
connection to an access database. here is the display part
of
the
record
<%= rstSearch.Fields("simage").Value %>
<%= rstSearch.Fields("simage_name").Value %>
<%= rstSearch.Fields("snumber").Value %>
Thanks
Paul M
message
See
http://www.asp101.com/samples/viewasp.asp?file=photos.asp
- change: If I Mod 2 = 1 Then
- to If I Mod 3 = 1 Then
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP -
FrontPage ]
"Warning - Using the F1 Key will not break anything!"
(-;
_____________________________________________
| Hi
| I am trying to build an online access database to
display
images
| Is there a way of displaying records in rows of three
horizontally
then
| another three etc insteadof one at a time vertically
so
it
looks
like
the
| images in this example
|
http://www.paulcmilner.co.uk/Gallery.asp
|
| Here is the table that displays the records It only
displays
vertically
| one ot a time
|
| Thanks
| Paul M
|
|
| <table border="1">
| <tr>
| <th>Name</th>
| <th>Sales</th>
| </tr>
| <%
| Do While Not rstSearch.EOF And rstSearch.AbsolutePage
=
iPageCurrent
| %>
| <tr>
| <td><%= rstSearch.Fields("first_name").Value %> <%=
| rstSearch.Fields("last_name").Value %></td>
| <td><%= rstSearch.Fields("sales").Value %></td>
| </tr>
| <%
|
| rstSearch.MoveNext
| Loop
| %>
| </table>
|
|
|
|
|
|