Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

column sorting and next/back page

Status
Not open for further replies.

jedrtd

Programmer
Jul 22, 2001
23
US
I'm tring to use this code on a page with column header sorting and page next/back. but I get an error

The value "" cannot be converted to a number


The Error Occurred in D:\ line 13

11 : <cfloop list="#CGI.Query_String#" index="namevaluepair" delimiters="&">
12 : <cfif ListFirst(namevaluepair, "=") NEQ "StartRow" >
13 : <cfset modifiedQueryString = modifiedQueryString + "&" + namevaluepair >
14 : </cfif>
15 : </cfloop>


HERE IS THE CODE


<cfset modifiedQueryString = "">
<cfloop list="#CGI.Query_String#" index="namevaluepair" delimiters="&">
<cfif ListFirst(namevaluepair, "=") NEQ "StartRow" >
<cfset modifiedQueryString = modifiedQueryString + "&" + namevaluepair >
</cfif>
</cfloop>


<CFOUTPUT>
<!--- Show link for Back, if appropriate --->
<CFIF StartRowBack GT 0>
<A HREF="#CGI.SCRIPT_NAME#?StartRow=#StartRowBack##modifiedQueryString#">
<IMG SRC="BrowseBack.gif" WIDTH="40" HEIGHT="16"
ALT="Back #RowsPerPage# Records" BORDER="0"></A>
</CFIF>
<!--- Show link for Next, if appropriate --->
<CFIF StartRowNext LTE TotalRows>
<A HREF="#CGI.SCRIPT_NAME#?StartRow=#StartRowNext##modifiedQueryString#">
<IMG SRC="BrowseNext.gif" WIDTH="40" HEIGHT="16"
ALT="Next #RowsPerPage# Records" BORDER="0"></A>
</CFIF>
</CFOUTPUT>
 
Try this instead and see what it gives you:
Code:
<cfset modifiedQueryString = "#modifiedQueryString#&#namevaluepair#">


Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top