Solved

next previous starting with specific record

Posted on 2003-11-17
14
627 Views
Last Modified: 2013-12-24
i'm paging thru some records.  the records have to start with the url param that's been passed along. eg - click on an image to show the enlarged version but then, if their is more than one image by the same artist in the database, page thru the remaining records.  my logic is to pass along both the main artist's id and the specific artwork id.  then, make the specific artwork id the startrow.   i can't quite seem to get it - this is what i have so far:

cf code:
<cfparam name="URL.AutoArtID" default="1">
<cfparam name="URL.ArtistID" default="1">
<cfparam name="StartRow_Artwork" default="#URL.AutoArtID#">


<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>

<cfparam name="PageNum_Artwork" default="1">
 
<cfquery name="Artwork" datasource="Ikonltd">
SELECT Title, "Date", lg, DescriptionWhole, WebDescriptionLine1, WebDescriptionLine2,
WebDescriptionLine3, WebDescriptionLine4, WebDescriptionLine5, WebDescriptionLine6,
WebDescriptionLine7, WebDescriptionLine8, WebDescriptionLine9, WebDescriptionLine10,
WebDescriptionLine11, WebDescriptionLine12, WebDescriptionLine13, WebDescriptionLine14,
WebDescriptionLine15, WebDescriptionLine16, WebDescriptionLine17, WebDescriptionLine18,
WebDescriptionLine19, WebDescriptionLine20 FROM Artwork WHERE  ArtistID=#URL.ArtistID#

</cfquery>

<cfset MaxRows_Artwork=1>
<cfset StartRow_Artwork=Min((PageNum_Artwork-1)*MaxRows_Artwork+1,Max(Artwork.RecordCount,1))>
<cfset EndRow_Artwork=Min(StartRow_Artwork+MaxRows_Artwork-1,Artwork.RecordCount)>
<cfset TotalPages_Artwork=Ceiling(Artwork.RecordCount/MaxRows_Artwork)>
<cfset QueryString_Artwork=Iif(CGI.QUERY_STRING NEQ "",DE("&"&CGI.QUERY_STRING),DE(""))>
<cfset tempPos=ListContainsNoCase(QueryString_Artwork,"PageNum_Artwork=","&")>
<cfif tempPos NEQ 0>
  <cfset QueryString_Artwork=ListDeleteAt(QueryString_Artwork,tempPos,"&")>
</cfif>

output:
<cfoutput query="Artwork" startrow="#StartRow_Artwork#" maxrows="#MaxRows_Artwork#"><img src="../images/lg/#Artwork.lg#"></cfoutput>
0
Comment
Question by:phillystyle123
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 17

Expert Comment

by:anandkp
Comment Utility
Hi ...

paging is easy ...

hi use this logic for ur requirement & i am sure it will see u thru ..

----------------------------------------------------------
<CFPARAM NAME="Startrow" Default="1">
<CFPARAM NAME="Maxrows" Default="5">

<CFQUERY NAME="get_paging"><!--- query table records for paging ! --->
   select * from table
</CFQUERY>

<CFIF get_paging.RecordCount EQ 0><!--- no records found --->

  display no rec found
 
<CFELSE><!--- records found --->
   <table>
       <tr>
         <th>heading 1</th>
         <th>heading 2</th>
         <th>heading 3</th>
       </tr>
    <CFOUTPUT QUERY="get_paging" StartRow="#StartRow#" MAXROWS="#MaxRows#">        
        <tr>
         <td>Record 1</td>
         <td>Record 2</td>
         <td>Record 3</td>
       </tr>
   </CFOUTPUT>
   </table>
     
    <CFOUTPUT><!--- ============================ paging prev & next buttons below ======================== --->
      <TABLE align="center" border="0" cellPadding="0" cellSpacing="2" width="100%">
            <TR>
                 <TD align="right">]
                  <FONT color="330066" size="1" face="Verdana"><B>          
                      <CFIF StartRow GTE MaxRows><!--- Condition for previous 10 records --->    
                            <A href="www.urdomainname.com/category.cfm?id=#id#&startrow=#Evaluate(StartRow - MaxRows)#">Previous</A>
                      </CFIF>
                      &nbsp;&nbsp;                    
                      <CFIF (StartRow + MaxRows) LTE get_paging.recordCount><!--- Condition for next 10 open records --->
                      <A href="www.urdomainname.com/category.cfm?id=#id#&startrow=#Evaluate(StartRow + MaxRows)#">Next</A>
                  </CFIF>
                  </FONT>
                 </TD>
          </TR>
      </TABLE>
  </CFOUTPUT>    
     
</CFIF>

let me know ...

K'Rgds
Anand
0
 

Author Comment

by:phillystyle123
Comment Utility
my problem is that i'm passing 2 url parameters call them

"specificid" and "generalid"

"specificid" refers to the specific image that i see when the new page opens.  
"generalid" is the category "specificid" belongs to (ie - i piece of artwork from a specific artist) so, my startrow has to start on #url.specificid# and then page thru all #generalid#s that "specificid" belongs to.  so, how do i get my page to start on that url param????
0
 
LVL 17

Expert Comment

by:anandkp
Comment Utility
u can pass "n" parameters if required in the querystring [u may modify this to be a form submit as well]

the main parameter required in the url is "startrow" - u can append all other parameters to this & the paging logic wld still remain the same.

I wld modify the snipped to suit ur requirement as

<TABLE align="center" border="0" cellPadding="0" cellSpacing="2" width="100%">
            <TR>
                 <TD align="right">]
                  <FONT color="330066" size="1" face="Verdana"><B>          
                      <CFIF StartRow GTE MaxRows><!--- Condition for previous 10 records --->    
                            <A href="www.urdomainname.com/category.cfm?specificid=#specificid#&generalid=#generalid#&startrow=#Evaluate(StartRow - MaxRows)#">Previous</A>
                      </CFIF>
                      &nbsp;&nbsp;                    
                      <CFIF (StartRow + MaxRows) LTE get_paging.recordCount><!--- Condition for next 10 open records --->
                      <A href="www.urdomainname.com/category.cfm?specificid=#specificid#&generalid=#generalid#&startrow=#Evaluate(StartRow + MaxRows)#">Next</A>
                  </CFIF>
                  </FONT>
                 </TD>
          </TR>
      </TABLE>

HTH

K'Rgds
Anand
0
 

Author Comment

by:phillystyle123
Comment Utility
still not working and i think i know why.  here (in my opinion) is the source of the problem:

in order to generate a specific image i'm using the following in my query:

WHERE  ArtistID=#URL.ArtistID# and AutoArtID=#url.AutoArtID#
</cfquery>

what i need is to use the AutoArtID (which is specific to the image i want to load when the page opens) and then use the image's ArtistID (if an image is a warhol print for example - warhol's ArtistID=1 and there are 30 "1"s)

so, it's not paging because i'm only outputing one image.

0
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
instead of using AutoArtID which is a specific id why not use an index.

If you know you have 30 records (from the record count)

use the current index (default to 1 or from url parameter) to display the current image

the next and previous are pretty much current index + 1 and current index - 1

something like this:
<cfparam name="URL.currentIndex" default="1">
<cfparam name="URL.ArtistID" default="1">
<!--- number to display --->
<cfset maxDisplay = 5>
<!--- max index --->
<cfset maxIndex = URL.currentIndex + maxDisplay>
 <!--- Note I added an order by clause as you want to gauruntee ordered results to get correct paging --->
<cfquery name="Artwork" datasource="Ikonltd">
SELECT Title, "Date", lg, DescriptionWhole, WebDescriptionLine1, WebDescriptionLine2,
WebDescriptionLine3, WebDescriptionLine4, WebDescriptionLine5, WebDescriptionLine6,
WebDescriptionLine7, WebDescriptionLine8, WebDescriptionLine9, WebDescriptionLine10,
WebDescriptionLine11, WebDescriptionLine12, WebDescriptionLine13, WebDescriptionLine14,
WebDescriptionLine15, WebDescriptionLine16, WebDescriptionLine17, WebDescriptionLine18,
WebDescriptionLine19, WebDescriptionLine20 FROM Artwork WHERE  ArtistID=#URL.ArtistID#
ORDER BY lg  

</cfquery>

<cfset maxIndex=5>
<cfset nextIndex = "">
<cfset prevIndex = "">
<cfset ma
<cfif Artwork.recordcount gte (URL.currentIndex + 5)>
  <cfset nextIndex = URL.currentIndex + 5>
</cfif>
<cfif URL.currentIndex - 5 gte 1>
  <cfset prevIndex = URL.currentIndex - 5>
</cfif>
<cfif maxIndex GT Artwork.recordcount><cfset maxIndex = Artwork.recordcount></cfif>


<cfoutput>
<cfif prevIndex is not ""><a href="#CGI.Script_Name#?ArtistID=#URL.ArtistID#&currentIndex=#prevIndex#">Prev</a></cfif>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<cfif nextIndex is not ""><a href="#CGI.Script_Name#?ArtistID=#URL.ArtistID#&currentIndex=#nextIndex#">Next</a></cfif>
<cfloop index="index" from="#URL.currentIndex#" to="#maxIndex#" step="1">
<img src="../images/lg/#Artwork[index].lg#">
</cfloop>
<cfif prevIndex is not ""><a href="#CGI.Script_Name#?ArtistID=#URL.ArtistID#&currentIndex=#prevIndex#">Prev</a></cfif>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<cfif nextIndex is not ""><a href="#CGI.Script_Name#?ArtistID=#URL.ArtistID#&currentIndex=#nextIndex#">Next</a></cfif>
</cfoutput>

CJ
0
 

Author Comment

by:phillystyle123
Comment Utility
fyi - here's the exact code i'm using and the URL to check out how it's being used - when i click on a thumb on the right i want that image to load where the bigger image is on the same page:

http://huffamoose.com/ikonnew/artists/details.cfm?ArtistID=1

also, i'm increasing the pts to 250 if anyone can basically stick with what i've got going code wise and come up with a solution

<cfparam name="URL.ArtistID" default="1">
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>

<cfparam name="PageNum_Artwork" default="1">
<cfparam name="PageNum_Thumbs" default="1">


 
<cfquery name="Artist" datasource="Ikonltd">
SELECT FirstName, LastName FROM Artists, Artwork WHERE Artists.ArtistID = #URL.ArtistID#
GROUP BY Artwork.ArtistID
</cfquery>
<cfquery name="Page2" datasource="Ikonltd">
SELECT Page2Title FROM Page2, Artwork WHERE Page2.Page2ID = Artwork.Page2ID
AND Artwork.ArtistID = #URL.ArtistID#
</cfquery>
<cfquery name="Artwork" datasource="Ikonltd">
SELECT Title, Date, med, sm, WebDescriptionLine1, WebDescriptionLine2, WebDescriptionLine3,
WebDescriptionLine4, WebDescriptionLine5, WebDescriptionLine6, WebDescriptionLine7,
WebDescriptionLine8, WebDescriptionLine9, WebDescriptionLine10, WebDescriptionLine11,
WebDescriptionLine12, WebDescriptionLine13, WebDescriptionLine14, WebDescriptionLine15,
WebDescriptionLine16, WebDescriptionLine17, WebDescriptionLine18, WebDescriptionLine19,
WebDescriptionLine20, Artwork.AutoArtID FROM Artwork WHERE ArtistID = #URL.ArtistID#
and Page2 = "0"  and ArtistPage ="1" ORDER BY AutoArtID asc
</cfquery>
<cfquery name="Thumbs" datasource="Ikonltd">
SELECT Title, Date, med, sm, WebDescriptionLine1, WebDescriptionLine2, WebDescriptionLine3,
WebDescriptionLine4, WebDescriptionLine5, WebDescriptionLine6, WebDescriptionLine7,
WebDescriptionLine8, WebDescriptionLine9, WebDescriptionLine10, WebDescriptionLine11,
WebDescriptionLine12, WebDescriptionLine13, WebDescriptionLine14, WebDescriptionLine15,
WebDescriptionLine16, WebDescriptionLine17, WebDescriptionLine18, WebDescriptionLine19,
WebDescriptionLine20, Artwork.AutoArtID FROM Artwork WHERE ArtistID = #URL.ArtistID#
and Page2 = "0"  and ArtistPage ="1" ORDER BY AutoArtID asc
</cfquery>

<cfset MaxRows_Artwork=1>
<cfset StartRow_Artwork=Min((PageNum_Artwork-1)*MaxRows_Artwork+1,Max(Artwork.RecordCount,1))>
<cfset EndRow_Artwork=Min(StartRow_Artwork+MaxRows_Artwork-1,Artwork.RecordCount)>
<!---Thumbs--->
<cfset display=16>
<cfset start=Min((PageNum_Thumbs-1)*display+1,Max(Thumbs.RecordCount,1))>
<cfset StartRow_Thumbs=Min((PageNum_Thumbs-1)*display+1,Max(Thumbs.RecordCount,1))>
<cfset EndRow_Thumbs=Min(StartRow_Thumbs+display-1,Thumbs.RecordCount)>
<cfset TotalPages_Thumbs=Ceiling(Thumbs.RecordCount/display)>
<cfset TotalPages_Thumbs=Ceiling(Thumbs.RecordCount/display)>
<cfset QueryString_Thumbs=Iif(CGI.QUERY_STRING NEQ "",DE("&"&CGI.QUERY_STRING),DE(""))>
<cfset tempPos=ListContainsNoCase(QueryString_Thumbs,"PageNum_Thumbs=","&")>
<cfif tempPos NEQ 0>
  <cfset QueryString_Thumbs=ListDeleteAt(QueryString_Thumbs,tempPos,"&")>
</cfif>
<!---End Thumbs--->
<cfset TotalPages_Artwork=Ceiling(Artwork.RecordCount/MaxRows_Artwork)>




<cfset QueryString_Artwork=Iif(CGI.QUERY_STRING NEQ "",DE("&"&CGI.QUERY_STRING),DE(""))>
<cfset tempPos=ListContainsNoCase(QueryString_Artwork,"PageNum_Artwork=","&")>
<cfif tempPos NEQ 0>
  <cfset QueryString_Artwork=ListDeleteAt(QueryString_Artwork,tempPos,"&")>
</cfif>
<HTML><!-- InstanceBegin template="/Templates/interiorpages.dwt.cfm" codeOutsideHTMLIsLocked="false" -->
<HEAD>
<!-- InstanceBeginEditable name="doctitle" -->
<TITLE>IKON Ltd Contemporary Art Gallery</TITLE>
<!-- InstanceEndEditable -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<link href="../css/ikonltd.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link.navbar {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: bold;
      color: #FFFFFF;
      text-decoration: none;
}
a:hover.navbar {

      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: bold;
      color: #FFFFFF;
      text-decoration: underline;
}
a:visited.navbar {


      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: bold;
      color: #FFFFFF;
      text-decoration: none;
}
a:hover.navbar {

      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: bold;
      color: #FFFFFF;
      text-decoration: underline;
}

-->
</style>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<TABLE WIDTH=760 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  <TR>
    <TD COLSPAN=3> <IMG SRC="../images/pageelements/header1.gif" WIDTH=760 HEIGHT=143 border="0" usemap="#Map"></TD>
  </TR>
  <TR>
    <TD bgcolor="#9EA6C9"> <IMG SRC="../images/spacer.gif" WIDTH=8 HEIGHT=27></TD>
    <TD bgcolor="#9EA6C9"> <table width="739" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top"><img src="../images/spacer.gif" width="739" height="1"></td>
        </tr>
        <tr>
          <td valign="top" align="center"><a href="../current/index.html" class="navbar">CURRENT
            EXHIBITIONS</a>&nbsp;&nbsp;&nbsp;<a href="../past/index.cfm" class="navbar">PAST
            EXHIBITIONS</a>&nbsp;&nbsp;&nbsp;<a href="index.cfm" class="navbar">ARTISTS</a>&nbsp;&nbsp;&nbsp;<a href="../newaq/index.cfm" class="navbar">NEW
            AQUISITIONS</a>&nbsp;&nbsp;&nbsp;<a href="../privateroom/index.cfm" class="navbar">PRIVATE
            ROOM</a>&nbsp;&nbsp;&nbsp;<a href="../about/index.cfm" class="navbar">ABOUT</a>&nbsp;&nbsp;&nbsp;<a href="../contact/index.cfm" class="navbar">CONTACT</a>&nbsp;&nbsp;&nbsp;<a href="../index.cfm" class="navbar">HOME</a></td>
        </tr>
      </table></TD>
    <TD bgcolor="#9EA6C9"> <IMG SRC="../images/spacer.gif" WIDTH=13 HEIGHT=27></TD>
  </TR>
  <TR>
    <TD COLSPAN=3> <IMG SRC="../images/pageelements/whitespace5.gif" WIDTH=760 HEIGHT=16></TD>
  </TR>
  <TR valign="top">
    <TD COLSPAN=3> <table width="760" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top"><img src="../images/spacer.gif" width="760" height="1"></td>
        </tr>
        <tr>
          <td valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="10" valign="top"><img src="../images/spacer.gif" width="1" height="343"></td>
                <!-- InstanceBeginEditable name="content" -->
                <td width="750" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td colspan="2" valign="top" align="left"><h1><cfoutput>#Artist.FirstName#&nbsp;#Artist.LastName#</cfoutput><cfif #Page2.Page2Title# is not "">: Featured
                                Works</cfif></h1></td>
                      <td valign="top" align="right"><cfif Page2.Page2Title is ""><cfelse><h1><a href="page2.cfm?ArtistID=<cfoutput>#URL.ArtistID#</cfoutput>">Go To <cfoutput>#Artist.LastName#&nbsp;#Page2.Page2Title#</cfoutput></a></h1></cfif></td>
                    </tr>
                    <tr>
                      <td valign="top">&nbsp;</td>
                      <td valign="top">&nbsp;</td>
                      <td valign="top">&nbsp;</td>
                    </tr>
                    <tr>
                      <td colspan="3" valign="top"><table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
                          <tr>
                            <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="26%" valign="top"><cfoutput query="Artwork" startrow="#StartRow_Artwork#" maxrows="#MaxRows_Artwork#"><a href="large.cfm?AutoArtID=#AutoArtID#" target="_blank"><img src="../images/med/#Artwork.med#" border="0"></a><br>
                                    </cfoutput></td>
                                  <td width="5%" valign="top"><img src="../images/spacer.gif" width="25" height="50"></td>
                                  <td width="69%" valign="top"><p>
                                      <cfif PageNum_Artwork GT 1>
                                        <b><a href="<cfoutput>#CurrentPage#?PageNum_Artwork=#Max(DecrementValue(PageNum_Artwork),1)##QueryString_Artwork#</cfoutput>">&lt;
                                        PREV</a></b>
                                      </cfif>
                                      &nbsp;
                                      <cfif PageNum_Artwork LT TotalPages_Artwork>
                                        <b><a href="<cfoutput>#CurrentPage#?PageNum_Artwork=#Min(IncrementValue(PageNum_Artwork),TotalPages_Artwork)##QueryString_Artwork#</cfoutput>">NEXT&gt;</a></b>
                                      </cfif>
                                    </p>
                                    <p><span class="uppercasetext"><cfoutput>#Artist.LastName#</cfoutput> #<cfoutput>#StartRow_Artwork#</cfoutput></span> of <span class="uppercasetext"><cfoutput>#Artwork.RecordCount#</cfoutput></span></p>
                                    <p class="uppercasetext"><cfoutput query="Artwork" startrow="#StartRow_Artwork#" maxrows="#MaxRows_Artwork#"><b>#Artwork.Title#</b>                                          <br>#Date#<br>
                                                      <cfif #WebDescriptionLine1#  is ""><cfelse>#WebDescriptionLine1#<br></cfif>
                                                      <cfif #WebDescriptionLine2#  is ""><cfelse>#WebDescriptionLine2#<br></cfif>
                                                      <cfif #WebDescriptionLine3#  is ""><cfelse>#WebDescriptionLine3#<br></cfif>
                                                      <cfif #WebDescriptionLine4#  is ""><cfelse>#WebDescriptionLine4#<br></cfif>
                                                      <cfif #WebDescriptionLine5#  is ""><cfelse>#WebDescriptionLine5#<br></cfif>
                                                      <cfif #WebDescriptionLine6#  is ""><cfelse>#WebDescriptionLine6#<br></cfif>
                                                      <cfif #WebDescriptionLine7#  is ""><cfelse>#WebDescriptionLine7#<br></cfif>
                                                      <cfif #WebDescriptionLine8#  is ""><cfelse>#WebDescriptionLine8#<br></cfif>
                                                      <cfif #WebDescriptionLine9#  is ""><cfelse>#WebDescriptionLine9#<br></cfif>
                                                      <cfif #WebDescriptionLine10#  is ""><cfelse>#WebDescriptionLine10#<br></cfif>
                                                      <cfif #WebDescriptionLine11#  is ""><cfelse>#WebDescriptionLine11#<br></cfif>
                                                      <cfif #WebDescriptionLine12#  is ""><cfelse>#WebDescriptionLine12#<br></cfif>
                                                      <cfif #WebDescriptionLine13#  is ""><cfelse>#WebDescriptionLine13#<br></cfif>
                                                      <cfif #WebDescriptionLine14#  is ""><cfelse>#WebDescriptionLine14#<br></cfif>
                                                      <cfif #WebDescriptionLine15#  is ""><cfelse>#WebDescriptionLine15#<br></cfif>
                                                      <cfif #WebDescriptionLine16#  is ""><cfelse>#WebDescriptionLine16#<br></cfif>
                                                      <cfif #WebDescriptionLine17#  is ""><cfelse>#WebDescriptionLine17#<br></cfif>
                                                      <cfif #WebDescriptionLine18#  is ""><cfelse>#WebDescriptionLine18#<br></cfif>
                                                      <cfif #WebDescriptionLine19#  is ""><cfelse>#WebDescriptionLine19#<br></cfif>
                                                      <cfif #WebDescriptionLine20#  is ""><cfelse>#WebDescriptionLine20#<br>
                                        </cfif>
                                      </cfoutput> </p>
                                    <p><i><a href="large.cfm?<cfoutput query="Artwork" startrow="#StartRow_Artwork#" maxrows="#MaxRows_Artwork#">AutoArtID=#Artwork.AutoArtID#&ArtistID=#ArtistID#</cfoutput>" target="_blank">Click
                                      for image detail</a></i></p>
                                                        
                                    <p><a href="mailto:ikonltd@earthlink.net?Subject=Re: <cfoutput>#Artist.FirstName#&nbsp;#Artist.LastName#</cfoutput>">Contact
                                      Us About This Artist</a></p></td>
                                </tr>
                              </table></td>
                            <td valign="top" width="34%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td><P align="center">BROWSE THUMBNAILS:</P></td>
                                </tr>
                                <tr>
                                  <td align="center"><table width="5%" border="0" cellpadding="2" cellspacing="2">
                                      <CFOUTPUT query="Thumbs" startrow="#start#" maxrows="#display#"> <cfif Thumbs.currentrow mod 4 eq 1>
                                        <tr></cfif>
                                          <TD valign="top"><a href="large.cfm?AutoArtID=#AutoArtID#" target="_blank"><img src="../images/sm/#sm#" border="0"></a></TD><cfif Thumbs.currentrow mod 4 eq 0>
                                        </tr></cfif>
                                      </cfoutput> </TABLE></td>
                                </tr>
                                <tr>
                                  <td align="center">&nbsp;</td>
                                </tr>
                                <tr>
                                  <td align="center"><p class="uppercasetext"><cfoutput>#Artist.LastName#
                                       
                                      </cfoutput> -<cfoutput>#StartRow_Thumbs#</cfoutput>- <cfoutput>#EndRow_Thumbs#</cfoutput></p></td>
                                </tr>
                                <tr>
                                  <td><div align="center" class="uppercasetext">
                                      <cfif PageNum_Thumbs GT 1>
                                        <a href="<cfoutput>#CurrentPage#?PageNum_Thumbs=#Max(DecrementValue(PageNum_Thumbs),1)##QueryString_Thumbs#</cfoutput>">&lt;Previous
                                        Group</a>
                                      </cfif>
                                      &nbsp;&nbsp;
                                      <cfif PageNum_Thumbs LT TotalPages_Thumbs>
                                        <a href="<cfoutput>#CurrentPage#?PageNum_Thumbs=#Min(IncrementValue(PageNum_Thumbs),TotalPages_Thumbs)##QueryString_Thumbs#</cfoutput>">Next
                                        Group&gt;</a>
                                      </cfif>
                                    </div></td>
                                </tr>
                              </table>
</td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td colspan="3" valign="top"><img src="../images/spacer.gif" width="100" height="50"></td>
                    </tr>
                  </table>
</td>
                <!-- InstanceEndEditable --></tr>
            </table></td>
        </tr>
      </table></TD>
  </TR>
  <TR>
    <TD COLSPAN=3> <IMG SRC="../images/pageelements/footer7.gif" WIDTH=760 HEIGHT=25></TD>
  </TR>
</TABLE>
<map name="Map">
  <area shape="rect" coords="2,2,281,143" href="../index.cfm" alt="IKON Ltd. Contemporary Art">
</map>
</BODY>
<!-- InstanceEnd --></HTML>
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 17

Expert Comment

by:anandkp
Comment Utility
If u just wanna show one image - then u may just change the maxrows to "1" instead of "5" as given in my example !

I am not able to understand - why it dosent work for u !
0
 

Author Comment

by:phillystyle123
Comment Utility
if you look at my code you'll see that maxrows is already set to 1.  anandkp, in your example it looks like you're trying to address the paging part of the question that is: once i've already clicked on the thumbnail (see http://huffamoose.com/ikonnew/artists/details.cfm?ArtistID=1) and the enlarged version of that particular thumbnail opens on the left, i can page.

i need to find out how to actually click on the thumbnail and have the enlarged version of that thumbnail appear on the left - this is something i haven't accomplished yet - and then be able to page from there.  
0
 
LVL 17

Expert Comment

by:anandkp
Comment Utility
I see that onclick - ur opening a new window ...

i wld suggest that u submit the details to the same window & carry on paging from there on ... all u need to do - is pass the imageid & other relavent information onclikc of the image.

& if ur planning to go ahead with new window - then do the same ... submit the details to the new window ... but then users will be able to open a whole lot of new windows & wont know exactly on how to navigate ...

ne-ways ... u decide whats best for u !
a small change in ur form & passing the values thru hidden fields shld see u thru ...
0
 

Author Comment

by:phillystyle123
Comment Utility
it seems easy but it's not  - i have the 2 IDs that I need to pass.  In order to get a specific image i'm using a SpecificImageID (or AutoArtID as i'm actually calling it in the code).  But, I'm generating all of a specific artist's images by using a ArtistID which I need to do to be able to page. i've got max rows set to 1. that's what my problem is.  I need to somehow set my startrow to "AutoArtID" and then be able to page thru the rest of the images.  
0
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
That is why I suggested using index instead of AutoArtID.  If your query is ordered then you can safely use index.

or just create a new query that retrieves the image info for the passed autoartid :-)

CJ
0
 

Author Comment

by:phillystyle123
Comment Utility
cheekycj

i tried to use index and got all sorts of errors - i figured since my code was so close that i must be missing something fairly obvious w/o having drastically redo everything. would you be up for taking a look at my code and modifying it with your index code?  
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
Closed, 250 points refunded.
modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now