Forums
This topic is locked
Images per page 12 - 16 - 32 - 64
Posted 31 Mar 2005 06:42:26
1
has voted
31 Mar 2005 06:42:26 David Forshaw posted:
HiI am trying to get a feature to work on a clients website.
I am building a image library in ASP VB Script and I want the user to be
able to select the amount of images they view on the page.
eg. Images per page 12 - 16 - 32 - 64
So selecting 12 for example would only show 12 records.
I am using the Horizontal Looper extension to display my images in 4
columns.
Have anyone ever done this before or know of how to do it?
Any help will be greatly appreciated.
Here are some examples that I have seen:
intersoft.net.au/KirkLand/program/pwp.exe?SESSION_ID=12481&TARGET_FORM=THUMB_PAGE&SET_ID=18
www.agefotostock.com/099hwdliqr/ingles/iskw01.asp?actual=1&tam=2&querystr=Dogs&id=9937660&anteriorbloque=1&tfoto=SSNNN&categs=NNNNNNNNNNNN&others=SSSSSSN&vertam=1&newtf=0
Thanks and regards
David Forshaw
<font face='Verdana'></font id='Verdana'>
Replies
Replied 31 Mar 2005 07:40:36
31 Mar 2005 07:40:36 Dave Thomas replied:
this is an old tutorial for ultradev4, but it may be useful as the logic is the same for what u need.
www.dmxzone.com/showDetail.asp?TypeId=7&NewsId=2658
regards
Dave Thomas
<b>DMX Zone Manager</b>
www.dmxzone.com/showDetail.asp?TypeId=7&NewsId=2658
regards
Dave Thomas
<b>DMX Zone Manager</b>
Replied 31 Mar 2005 07:50:13
31 Mar 2005 07:50:13 David Forshaw replied:
Hi Dave
Thanks for your speedy reply. Its very appreciated <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Unfortunately I have tried this method before and it works fine for the standard Dreamweaver Repeat Region behaviour.
The problem is that I am using the Horizontal recordset extension behaviour.
Now I have got it to work based on that same request.Querystring principle but then some other features stop working.
For example, once I edit the Horizontal looper code the recordset paging and recordset navigation bars stop working.
Any ideas??
Heres my Horizontal Looper code (before I altered it):
<%
Dim HLooper1__numRows
HLooper1__numRows = 12
Dim HLooper1__index
HLooper1__index = 0
rsImageList_numRows = rsImageList_numRows + HLooper1__numRows
%>
AND AROUND THE TABLE:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%
startrw = 0
endrw = HLooper1__index
numberColumns = 4
numrows = 3
while((numrows <> 0) AND (Not rsImageList.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<tr align="center" valign="top">
<%
While ((startrw <= endrw) AND (Not rsImageList.EOF))
%>
<td align="left">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><img src="images/images/<%= Thumbnail("s",(rsImageList.Fields.Item("txtThumbnail".Value)) %>" /></td>
<td width="10" rowspan="2"> </td>
</tr>
<tr>
<td><%=(rsImageList.Fields.Item("txtImageNumber".Value)%></td>
<td>B V </td>
</tr>
<tr>
<td colspan="2"> </td>
<td> </td>
</tr>
</table></td>
<%
startrw = startrw + 1
rsImageList.MoveNext()
Wend
%>
</tr>
<tr align="center" valign="top">
<td align="left">
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_moveFirst%>">First</a>
<% End If ' end MM_offset <> 0 %>
</td>
<td width="31%" align="center">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_movePrev%>">Previous</a>
<% End If ' end MM_offset <> 0 %>
</td>
<td width="23%" align="center">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveNext%>">Next</a>
<% End If ' end Not MM_atTotal %>
</td>
<td width="23%" align="center">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveLast%>">Last</a>
<% End If ' end Not MM_atTotal %>
</td>
</tr>
</table></td>
</tr>
<%
numrows=numrows-1
Wend
%>
</table>
Any ideas on how that could be altered??
Thanks
Dave
Thanks for your speedy reply. Its very appreciated <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Unfortunately I have tried this method before and it works fine for the standard Dreamweaver Repeat Region behaviour.
The problem is that I am using the Horizontal recordset extension behaviour.
Now I have got it to work based on that same request.Querystring principle but then some other features stop working.
For example, once I edit the Horizontal looper code the recordset paging and recordset navigation bars stop working.
Any ideas??
Heres my Horizontal Looper code (before I altered it):
<%
Dim HLooper1__numRows
HLooper1__numRows = 12
Dim HLooper1__index
HLooper1__index = 0
rsImageList_numRows = rsImageList_numRows + HLooper1__numRows
%>
AND AROUND THE TABLE:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%
startrw = 0
endrw = HLooper1__index
numberColumns = 4
numrows = 3
while((numrows <> 0) AND (Not rsImageList.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<tr align="center" valign="top">
<%
While ((startrw <= endrw) AND (Not rsImageList.EOF))
%>
<td align="left">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><img src="images/images/<%= Thumbnail("s",(rsImageList.Fields.Item("txtThumbnail".Value)) %>" /></td>
<td width="10" rowspan="2"> </td>
</tr>
<tr>
<td><%=(rsImageList.Fields.Item("txtImageNumber".Value)%></td>
<td>B V </td>
</tr>
<tr>
<td colspan="2"> </td>
<td> </td>
</tr>
</table></td>
<%
startrw = startrw + 1
rsImageList.MoveNext()
Wend
%>
</tr>
<tr align="center" valign="top">
<td align="left">
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_moveFirst%>">First</a>
<% End If ' end MM_offset <> 0 %>
</td>
<td width="31%" align="center">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_movePrev%>">Previous</a>
<% End If ' end MM_offset <> 0 %>
</td>
<td width="23%" align="center">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveNext%>">Next</a>
<% End If ' end Not MM_atTotal %>
</td>
<td width="23%" align="center">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveLast%>">Last</a>
<% End If ' end Not MM_atTotal %>
</td>
</tr>
</table></td>
</tr>
<%
numrows=numrows-1
Wend
%>
</table>
Any ideas on how that could be altered??
Thanks
Dave
Replied 31 Mar 2005 08:14:11
31 Mar 2005 08:14:11 Dave Thomas replied:
i aint no genius when it comes to programming code, and surely there's a more
advanced way of doing this. So because i have to keep things simple for myself, i'd go with
something like.
have 4 pages for the different img values 12,16,32,64.
use your code as a default page to show the 12 images.
have a radio button set up that passes a querystring so if someone selects a different number it loads
that page instead?
u could also have this written to a cookie so it remembers the img numbers to display.
sounds feasible enough <img src=../images/dmxzone/forum/icon_smile_blackeye.gif border=0 align=middle>
regards
Dave Thomas
<b>DMX Zone Manager</b>
advanced way of doing this. So because i have to keep things simple for myself, i'd go with
something like.
have 4 pages for the different img values 12,16,32,64.
use your code as a default page to show the 12 images.
have a radio button set up that passes a querystring so if someone selects a different number it loads
that page instead?
u could also have this written to a cookie so it remembers the img numbers to display.
sounds feasible enough <img src=../images/dmxzone/forum/icon_smile_blackeye.gif border=0 align=middle>
regards
Dave Thomas
<b>DMX Zone Manager</b>
Replied 31 Mar 2005 10:38:28
31 Mar 2005 10:38:28 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I am building a image library in ASP VB Script and I want the user to be able to select the amount of images they view on the page. (eg. Images per page 12 - 16 - 32 - 64). So selecting 12 for example would only show 12 records. I am using the Horizontal Looper extension to display my images in 4 columns.
Have anyone ever done this before or know of how to do it?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
The <i>Recordset</i> navigation that may be intergrated with Horizontal Looper. I know I did it with InterAKT's <i>MX Looper</i>, so shouldn't be too hard. The <i>Repeat Region</i> should be limited to 12, and all should fall in line.
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
Have anyone ever done this before or know of how to do it?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
The <i>Recordset</i> navigation that may be intergrated with Horizontal Looper. I know I did it with InterAKT's <i>MX Looper</i>, so shouldn't be too hard. The <i>Repeat Region</i> should be limited to 12, and all should fall in line.
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>