There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Web Design & Development
Tag Cloud
adware audio blue screen boot bsod computer cpu crash dell desktop driver drivers error excel external hard drive firefox freeze freezes freezing hard drive hardware hijackthis internet internet explorer itunes laptop malware motherboard mouse network networking outlook 2007 power printer problem ram restart router screen slow sound trojan usb virus vista vista 32-bit windows windows xp winxp wireless
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
image gallery using asp & dreamweaver problem


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
19-Apr-2005, 04:42 PM #1
Angry image gallery using asp & dreamweaver problem
hey all imin need of a bit of helpim trying to build a website that consists of a main pageand an i frame in the i frame is a gallery which pulls images froma database. The problem i am having is i can use a repeating group to display my images 1 per line but i want to display them continuasly. So i can have more than one image per line. For somereason i cannot do this using aspand dreamwaever i have created a table and inserted the image linkthen set it to repeat group but it still only shows one image per line.
Squashman's Avatar
Distinguished Member with 12,741 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
19-Apr-2005, 05:08 PM #2
I always like to say "Why re-invent the wheel." There are plenty of ASP scripts that do this already. Some are free and some cost a little bit of money.

See if you find something you like here.
http://www.hotscripts.com/ASP/Script...ies/index.html
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
19-Apr-2005, 05:17 PM #3
Post your code. It sounds like you don't have the repeating region set up correctly. You need to repeat the row not the table or TD.
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
20-Apr-2005, 04:22 AM #4
Heres the code guys

<%@LANGUAGE="VBSCRIPT"%>

<!--#include file="Connections/project.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_project_STRING
Recordset1.Source = "SELECT * FROM stone_island ORDER BY picture_number ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<title>stoney1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FF9900" text="#666666">
<div align="center">
<table width="100%" border="1" cellpadding="3" cellspacing="3" bordercolor="#FFCC00">
<tr bgcolor="#FF9900">
<td colspan="3"><div align="center">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="130">
<param name="movie" value="images/Flash%20banner.swf">
<param name="quality" value="high">
<embed src="images/Flash%20banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="569" height="130"></embed></object>
</div></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr bgcolor="#FF9900">
<td height="44">Image</td>
<td><img src=<%=(Recordset1.Fields.Item("Image").Value) %>></td>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
%>
</tr>
<% Wend %>
</table>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
20-Apr-2005, 12:32 PM #5
I guess I misunderstood your first post. The way you are trying to do this will only display one image per line. Are you wanting to put like two images per line? It would be helpful to see an example of what you are trying to accomplish.
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
20-Apr-2005, 06:36 PM #6
Thanks for your replies at the moment i am only getting 1 image per line as you saywhat i am looking for is something along the lines of what is shown here http://www.vintagedesignerclothing.com/armani.html but i am looking to display 3 image per line. So i would show product details then product image over and over again. Thanks for all the help.
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
21-Apr-2005, 12:09 PM #7
You are confusing my brainage. Do you want the same image on the same line three times or three different images on the same line with descriptions? The link to your example doesn't work
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
22-Apr-2005, 04:41 AM #8
The link works fine for me but just to confirm i want three different images on the same line with descriptions. Thanks and sorry i havent really explained myself very well.
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
25-Apr-2005, 01:30 PM #9
Anyone pleeeeaaaase help a guy out.
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
25-Apr-2005, 03:44 PM #10
You will need to put the total records returned into a variable so you can count out three <TD>'s write a new <TR> tag and loop until the count of TD's equals your variable. It is not as easy as writing one image and description to a single line.
__________________
**Disclaimer** Anything below this line ^ is part of my signature for those that may be confused

Sadly, there are no integers on this scale, so your gangly adolescent attempt to be clever has proved futile....Dieter

I have the right "NOT" to be tolerant of others because they are different, weird, or tick me off.....Parody of Andy Rooney

There are no stupid questions, but there are a LOT of inquisitive idiots.
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
26-Apr-2005, 01:12 PM #11
I think this is a little beyond my capabilities. I amnot really sure where to start with this so it looks like i will be looking for something ready made can anyone help me in this direction ie template or dreamweaver extension.
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
05-May-2005, 12:31 PM #12
i am having problems with this because i need to show an image the the information about it this will include an add to basket and buy now button the sizes available etc but when i put the repeat in it just repeats the original button as well i amlooking to do something along the lines of what is displayed here
http://www.bbclothing.co.uk/acatalog/cp_company.html
any help would be really great thanks.
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
05-May-2005, 12:36 PM #13
If you use the repeat section you can do it exactly like the example you posted. It is the three across thing that is the stumbling block. If you want me to look at the db and code let me know.
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
05-May-2005, 01:29 PM #14
please would you id be very grateful. Is there any way i could send you the code etc for you to look at it is only small at the moment and the database only contains a single table. Once this is working i will be able to sort out the rest. Thanks alot for all your help. PS i gave up with the 3 in a row as it seemed far to complicated and this type of layout seemed far easier. The only other problem is that if i limit a page to say 5 items when the next page is displayed i need to the table to continue from where the previous one left off.

Last edited by psychosurfer : 05-May-2005 01:35 PM.
psychosurfer's Avatar
Junior Member with 26 posts.
 
Join Date: Mar 2005
Experience: Intermediate
14-May-2005, 11:15 AM #15
Big thanks to rocknthanks to him im almost there but i now have another problem i am getting a repeat region etc but the problem is that i am using paypal to take payments.The problem occurs when i try and select a product as the repeat region seems to be repeating the paypalbutton aswell. So no matter what item you select it adds the same thing over and over again. Any help would be great cheers. The code is as follows.

<%@LANGUAGE="VBSCRIPT"%>

<!--#include file="Connections/project.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_project_STRING
Recordset1.Source = "SELECT * FROM stone_island"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 5
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last

' set the record count
Recordset1_total = Recordset1.RecordCount

' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
Recordset1_numRows = 1
End If

' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1

' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
If (Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
End If
%>
<%
Dim MM_paramName
%>
<%
' *** Move To Record and Go To Record: declare variables

Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined

Dim MM_param
Dim MM_index

Set MM_rs = Recordset1
MM_rsCount = Recordset1_total
MM_size = Recordset1_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter

if (Not MM_paramIsDefined And MM_rsCount <> 0) then

' use index parameter if defined, otherwise use offset parameter
MM_param = Request.QueryString("index")
If (MM_param = "") Then
MM_param = Request.QueryString("offset")
End If
If (MM_param <> "") Then
MM_offset = Int(MM_param)
End If

' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If

' move the cursor to the selected record
MM_index = 0
While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
If (MM_rs.EOF) Then
MM_offset = MM_index ' set MM_offset to the last possible record
End If

End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range

If (MM_rsCount = -1) Then

' walk to the end of the display range for this page
MM_index = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend

' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = MM_index
If (MM_size < 0 Or MM_size > MM_rsCount) Then
MM_size = MM_rsCount
End If
End If

' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If

' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If

' move the cursor to the selected record
MM_index = 0
While (Not MM_rs.EOF And MM_index < MM_offset)
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats

' set the first and last displayed record
Recordset1_first = MM_offset + 1
Recordset1_last = MM_offset + MM_size

If (MM_rsCount <> -1) Then
If (Recordset1_first > MM_rsCount) Then
Recordset1_first = MM_rsCount
End If
If (Recordset1_last > MM_rsCount) Then
Recordset1_last = MM_rsCount
End If
End If

' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links

Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev

Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
MM_paramList = Split(MM_keepMove, "&")
MM_keepMove = ""
For MM_paramIndex = 0 To UBound(MM_paramList)
MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If

' set the strings for the move to links
If (MM_keepMove <> "") Then
MM_keepMove = MM_keepMove & "&"
End If

MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="

MM_moveFirst = MM_urlStr & "0"
MM_moveLast = MM_urlStr & "-1"
MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
MM_movePrev = MM_urlStr & "0"
Else
MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<html>
<head>
<title>stoney1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.desctxt {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 14px;
color: #333333;
vertical-align: text-top;
padding: 10px;
}
-->
</style>
<style type="text/css">
<!--
.pgTitle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 24px;
font-weight: bold;
text-align: left;
text-indent: 10pt;
font-style: italic;
text-transform: uppercase;
color: #FFCC66;
}
-->
</style>
</head>

<body bgcolor="#FF9900" text="#666666">
<div align="center">
<table width="100%" border="0" cellpadding="3" cellspacing="3" bordercolor="#FFCC00">
<tr bgcolor="#FF9900">
<td colspan="5"><div align="center">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="130">
<param name="movie" value="images/Flash%20banner.swf">
<param name="quality" value="high">
<embed src="images/Flash%20banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="569" height="130"></embed></object>
</div></td>
</tr>
<tr>
<td colspan="5" class="pgTitle"><div align="center"><%= Request.QueryString("title") %></div></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr bgcolor="#FF9900">
<td height="44" width="23%" class="desctxt"><p align="center" class="desctxt" style="margin-top: 0; margin-bottom: 0"><%=(Recordset1.Fields.Item("Item_Title").Value)%></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal" style="margin-top: 0;">
<div align="center">
</div>
</form>
<div align="center">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal" style="margin-top: 0; margin-bottom: 0;">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="macromedia.contribute.3_0_0">
<input type="hidden" name="business" value="psychosurfer@fsmail.net">
<input type="hidden" name="item_name" value="item1">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="75">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="receiver_email" value="psychosurfer@fsmail.net">
<input type="hidden" name="mrb" value="R-2K410090UE355584L">
<input type="hidden" name="pal" value="A3X7N2U4UM6U8">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="0">
<input type="image" name="submit" src="http://images.paypal.com/images/sc-but-01.gif" border="0" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
</div>
<p style="margin-bottom: 0;">&nbsp;</p>
<div align="center">
<p style="margin-bottom: 0"><br>
<strong><%="Price: "&(Recordset1.Fields.Item("Item_Cost").Value)%></strong> <br>
<%="Sizes: "&(Recordset1.Fields.Item("Item_Sizes").Value)%></p>

</div></td>
<td width="5%" class="desctxt">&nbsp;</td>
<td width="8%"><img src=<%=(Recordset1.Fields.Item("Item_Image").Value) %>></td>
<td width="35%" bordercolor="#333333" class="desctxt">
<div align="center">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="margin-bottom: 0;"><%=(Recordset1.Fields.Item("Item_Desc").Value)%></p>
</div></td>
<td width="29%">&nbsp;</td>
</tr>
<tr>
<td colspan="5" height="1"><img src="images/botdot.gif" height="1" border="0"></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
<A HREF="<%=MM_movePrev%>">Previous</A> |
<A HREF="<%=MM_moveNext%>">Next </A></div>
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:38 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.