Hi,
I have been working on a project and have nearly got it complete but one thing is causing me an issue. Basically, i have built a query page where you can select records from the database based on what the user wants.
Then it displays the results and you can click next - last page , back etc. There could be thousands of results with 30 displayed on each page.
What i really need is to store the records that the user put ticks in until they are ready to submit their selection.
Is there any simple method for doing this? Any help would be great.
Thanks
Here is the code, bit messy, sorry
CODE:
I have been working on a project and have nearly got it complete but one thing is causing me an issue. Basically, i have built a query page where you can select records from the database based on what the user wants.
Then it displays the results and you can click next - last page , back etc. There could be thousands of results with 30 displayed on each page.
What i really need is to store the records that the user put ticks in until they are ready to submit their selection.
Is there any simple method for doing this? Any help would be great.
Thanks
Here is the code, bit messy, sorry
CODE:
Code:
<%@ LANGUAGE = VBScript %>
<!--#include file="includes/connection.asp"-->
<%
'SETS THE NOTVALUE TO <> FOR THE QUERY PROCESS
If Request.Form("not1") = "on" Then not1 = "<>" End If
If Request.Form("not2") = "on" Then not2 = "<>" End If
If Request.Form("not3") = "on" Then not3 = "<>" End If
If Request.Form("not4") = "on" Then not4 = "<>" End If
If Request.Form("not5") = "on" Then not5 = "<>" End If
'TESTER FORINDIVIDUAL FIELD ELEMENTS
'response.write(Request.Form("select1"))& "<br />"
'response.write(Request.Form("userselect1"))& "<br />"
'response.write(Request.Form("andor1"))& "<br />"
'response.write(not1)& "<br />"
'response.write(Request.Form("not1"))& "<br /><br />--------------<br />"
'response.write(Request.Form("select2"))& "<br />"
'response.write(Request.Form("userselect2"))& "<br />"
'response.write(Request.Form("andor2"))& "<br />"
'response.write(not1)& "<br />"
'response.write(Request.Form("not1"))& "<br /><br />--------------<br />"
'response.write(Request.Form("andor3"))& "<br />"
'response.write(not3)& "<br />"
'response.write(Request.Form("select3"))& "<br />"
'response.write(Request.Form("operator3"))& "<br />"
'response.write(Request.Form("userselect3"))& "<br />"
'response.write(Request.Form("not3"))& "<br /><br />--------------<br />"
'response.write(Request.Form("andor4"))& "<br />"
'response.write(not3)& "<br />"
'response.write(Request.Form("select4"))& "<br />"
'response.write(Request.Form("operator4"))& "<br />"
'response.write(Request.Form("userselect4"))& "<br />"
'response.write(Request.Form("not4"))& "<br /><br />--------------<br />"
'response.write(Request.Form("andor5"))& "<br />"
'response.write(not3)& "<br />"
'response.write(Request.Form("select5"))& "<br />"
'response.write(Request.Form("operator5"))& "<br />"
'response.write(Request.Form("userselect5"))& "<br />"
'response.write(Request.Form("not5"))& "<br /><br />--------------<br />"
'THIS WORKS THROUGH EACH VARIATION OF A USERS SLECTION TO MAKE SURE THE CORRECT VALUES ARE PUT THROUGH AND RUN. TO ADD ADDITIONAL QUERY FIELDS YOU WOULD NEEDTO COPY ONE OF THE SECTIONS BELOW AND CHANGE THE NUMERIC VALUES TO THE NEXT LOGICAL NUMBER I.E. 6 YOU WOULD ALOS NEED TO ADD THE FORM ELEMENT, AGAIN CHANGING THE NUMBERS FOR THE FORM NAMES TO THE NEXT LOGICAL NUMBER, AND LAST OF ALL ADD ADDITIONAL JAVASCRIPT IN THE SAME WAY.
If Request.Form("operator1") = "contains" Then operator1 = "LIKE "&"'%"& Request.Form("userselect1") &"%'" Else If Request.Form("operator1") = "startswith" Then operator1 = "LIKE '"& Request.Form("userselect1") &"%'" Else If Request.Form("operator1") = "" Then operator1 = "= '" & Request.Form("userselect1") &"' OR " & Request.Form("select1")& " IS NULL" Else If Request.Form("operator1") = "selectoperator1" Then operator1 = "" &" '"&Request.Form("userselect1") &"'" Else operator1 = Request.Form("operator1") &" '"&Request.Form("userselect1") &"'" End If
If Request.Form("operator2") = "contains" Then operator2 = "LIKE "&"'%"& Request.Form("userselect2") &"%'" Else If Request.Form("operator2") = "startswith" Then operator2 = "LIKE '"& Request.Form("userselect2") &"%'" Else If Request.Form("operator2") = "" Then operator2 = "= '" & Request.Form("userselect2") &"' OR " & Request.Form("select2")& " IS NULL" Else If Request.Form("operator2") = "selectoperator2" Then operator2 = "" &" '"&Request.Form("userselect2") &"'" Else operator2 = Request.Form("operator2") &" '"&Request.Form("userselect2") &"'" End If
If Request.Form("operator3") = "contains" Then operator3 = "LIKE "&"'%"& Request.Form("userselect3") &"%'" Else If Request.Form("operator3") = "startswith" Then operator3 = "LIKE '"& Request.Form("userselect3") &"%'" Else If Request.Form("operator3") = "" Then operator3 = "= '" & Request.Form("userselect3") &"' OR " & Request.Form("select3")& " IS NULL" Else If Request.Form("operator3") = "selectoperator3" Then operator3 = "" &" '"&Request.Form("userselect3") &"'" Else operator1 = Request.Form("operator3") &" '"&Request.Form("userselect3") &"'" End If
If Request.Form("operator4") = "contains" Then operator4 = "LIKE "&"'%"& Request.Form("userselect4") &"%'" Else If Request.Form("operator4") = "startswith" Then operator4 = "LIKE '"& Request.Form("userselect4") &"%'" Else If Request.Form("operator4") = "" Then operator4 = "= '" & Request.Form("userselect4") &"' OR " & Request.Form("select4")& " IS NULL" Else If Request.Form("operator4") = "selectoperator4" Then operator4 = "" &" '"&Request.Form("userselect4") &"'" Else operator4 = Request.Form("operator4") &" '"&Request.Form("userselect4") &"'" End If
If Request.Form("operator5") = "contains" Then operator5 = "LIKE "&"'%"& Request.Form("userselect5") &"%'" Else If Request.Form("operator5") = "startswith" Then operator5 = "LIKE '"& Request.Form("userselect5") &"%'" Else If Request.Form("operator5") = "" Then operator5 = "= '" & Request.Form("userselect5") &"' OR " & Request.Form("select5")& " IS NULL" Else If Request.Form("operator5") = "selectoperator5" Then operator5 = "" &" '"&Request.Form("userselect5") &"'" Else operator5 = Request.Form("operator5") &" '"&Request.Form("userselect5") &"'" End If
' HERE WE BUILD THE QUERY DEPENDANT ON WHAT THE USER HAS SELECTED FROM THE QUERY FORM.
If Request.Form("select1") <> "select" Then
qryresult = Request.Form("select1") & " " & (not1) & " " & (operator1)
If Request.Form("select1") <> "select" AND Request.Form("select2") <> "select" Then
qryresult = qryresult & " " & Request.Form("andor1") & " " & Request.Form("select2") & " " & (not2) & " " & (operator2)
If Request.Form("select1") <> "select" AND Request.Form("select2") <> "select" AND Request.Form("select3") <> "select" Then
qryresult = qryresult & " " & Request.Form("andor2") & " " & Request.Form("select3") & " " & (not3) & " " & (operator3)
If Request.Form("select1") <> "select" AND Request.Form("select2") <> "select" AND Request.Form("select3") <> "select" AND Request.Form("select4") <> "select" Then
qryresult = qryresult & " " & Request.Form("andor3") & " " & Request.Form("select4") & " " & (not4) & " " & (operator4)
If Request.Form("select1") <> "select" AND Request.Form("select2") <> "select" AND Request.Form("select3") <> "select" AND Request.Form("select4") <> "select" AND Request.Form("select5") <> "select" Then
qryresult = qryresult & " " & Request.Form("andor5") & " " & Request.Form("select5") & " " & (not5) & " " & (operator5)
End If
End If
End If
End If
End If
' HERE WE TAKE THE FIELD, IF ANY THAT IS GOIN GTO BE THE SORT FIELD
If Request.Form("orderby") = "" Then orderby = "" Else If Request.Form("orderby") <> "" Then orderby = "ORDER BY"&" "&Request.Form("orderby") End If
If Request.QueryString("sqlquery") <> "" Then
strSQL = Request.QueryString("sqlquery")
strSQL = Replace(strSQL,"""","'")
strSQL = Replace(strSQL,"per","%")
'response.write(strSQL)
'Session("test") = strSQL
'response.write(strSQL)
Else
'THE FINISHED QUERY
strSQL = "SELECT * FROM wce_contact WHERE " &(qryresult)& " "& (orderby)
test = (Replace(strSQL,"'",""""))
test = (Replace(test,"%","per"))
Session("test") = test
response.write("b")
End If
'TEST THE QUERY AND PRINT TO THE SCREEN
'CONFIGURE RECORD LOCKING AND VARIABLES
Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
'Const adCmdTableDirect = &H0200
Const adUseClient = 3
dim strSQL, objRS, I, records
Dim objConnection
Dim abspage, pagecnt, wce_contact
'OPEN THE CONNECTION TO THE DATABASE
objConnection ="PROVIDER=SQLOLEDB;DATA SOURCE=2003SERVER\SQLEXPRESS;UID=sa;PWD=sleoni;DATABASE=dccare_site"
'store the record number in a variable as you will refer to thisa few times later on
records = request.querystring("records")
set objRS = server.CreateObject("ADODB.Recordset")
objRS.PageSize = 25 'this is the amount of records you ned on a page
objRS.CacheSize = 300
objRS.CursorLocation = adUseClient
'open the recordset
objRS.Open strSQL, objConnection, adOpenForwardOnly, adLockReadOnly, wce_contact
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>WiredContact Enterprise</title>
<script type="text/javascript">
function openTarget (form, features, windowName) {
if (!windowName)
windowName = 'formTarget' + (new Date().getTime());
form.target = windowName;
open ('', windowName, features);
}
function checkAll() {
var is_checked = document.results.checkbox.checked;
alert(is_checked);
var cbs = document.results.elements["uniqueid"];
for (var i=0; i<cbs.length; i++) {
cbs[i].checked = is_checked;
}
}
function submitform(){
document.results.submit()
return true;
}
function zerocorrection(){
if (mailerlookup.operator1.value == "" && mailerlookup.select1.value == "Rooms_From")
mailerlookup.userselect1.value = 0;
else if (mailerlookup.operator1.value == "" && mailerlookup.select1.value == "Rooms_To")
mailerlookup.userselect1.value = 0;
else if (mailerlookup.operator1.value == "" && mailerlookup.select1.value == "Price_From")
mailerlookup.userselect1.value = 0;
else if (mailerlookup.operator1.value == "" && mailerlookup.select1.value == "Price_To")
mailerlookup.userselect1.value = 0;
else if (mailerlookup.operator1.value == "" && mailerlookup.select1.value == "Price")
mailerlookup.userselect1.value = 0;
if (mailerlookup.operator2.value == "" && mailerlookup.select2.value == "Rooms_From")
mailerlookup.userselect2.value = 0;
else if (mailerlookup.operator2.value == "" && mailerlookup.select2.value == "Rooms_To")
mailerlookup.userselect2.value = 0;
else if (mailerlookup.operator2.value == "" && mailerlookup.select2.value == "Price_From")
mailerlookup.userselect2.value = 0;
else if (mailerlookup.operator2.value == "" && mailerlookup.select2.value == "Price_To")
mailerlookup.userselect2.value = 0;
else if (mailerlookup.operator2.value == "" && mailerlookup.select2.value == "Price")
mailerlookup.userselect2.value = 0;
if (mailerlookup.operator3.value == "" && mailerlookup.select3.value == "Rooms_From")
mailerlookup.userselect3.value = 0;
else if (mailerlookup.operator3.value == "" && mailerlookup.select3.value == "Rooms_To")
mailerlookup.userselect3.value = 0;
else if (mailerlookup.operator3.value == "" && mailerlookup.select3.value == "Price_From")
mailerlookup.userselect3.value = 0;
else if (mailerlookup.operator3.value == "" && mailerlookup.select3.value == "Price_To")
mailerlookup.userselect3.value = 0;
else if (mailerlookup.operator3.value == "" && mailerlookup.select3.value == "Price")
mailerlookup.userselect3.value = 0;
if (mailerlookup.operator4.value == "" && mailerlookup.select4.value == "Rooms_From")
mailerlookup.userselect4.value = 0;
else if (mailerlookup.operator4.value == "" && mailerlookup.select4.value == "Rooms_To")
mailerlookup.userselect4.value = 0;
else if (mailerlookup.operator4.value == "" && mailerlookup.select4.value == "Price_From")
mailerlookup.userselect4.value = 0;
else if (mailerlookup.operator4.value == "" && mailerlookup.select4.value == "Price_To")
mailerlookup.userselect4.value = 0;
else if (mailerlookup.operator4.value == "" && mailerlookup.select4.value == "Price")
mailerlookup.userselect4.value = 0;
if (mailerlookup.operator5.value == "" && mailerlookup.select5.value == "Rooms_From")
mailerlookup.userselect5.value = 0;
else if (mailerlookup.operator5.value == "" && mailerlookup.select5.value == "Rooms_To")
mailerlookup.userselect5.value = 0;
else if (mailerlookup.operator5.value == "" && mailerlookup.select5.value == "Price_From")
mailerlookup.userselect5.value = 0;
else if (mailerlookup.operator5.value == "" && mailerlookup.select5.value == "Price_To")
mailerlookup.userselect5.value = 0;
else if (mailerlookup.operator5.value == "" && mailerlookup.select5.value == "Price")
mailerlookup.userselect5.value = 0;
}
</script>
<style type="text/css">
table.results td
{ font-family: Verdana;
font-weight: normal;
font-size: 11px;
color: #404040;
background-color: #fafafa;
border: 0px #6699CC solid;
border-collapse: collapse;
border-spacing: 0px;
margin-top: 0px;}
table.query td
{ font-family: Verdana;
font-weight: normal;
font-size: 11px;
color: #404040;
background-color: #F7EFCE;
border: 0px #6699CC solid;
border-collapse: collapse;
border-spacing: 2px;
margin-top: 0px;}
A:link {text-decoration: none; color: #ff3300;}
A:visited {text-decoration: none; color: #ff3300;}
A:active {text-decoration: none; color: #ff3300;}
A:hover {text-decoration: none; color: #0099cc;}
.btn {
color: #900;
background: #F7EFCE;
font-weight: bold;
border: 1px solid #900;
}
</style>
</head>
<body bgcolor="#F7EFCE" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="mailerlookup" method="post" action="MailerLookup.asp">
<table width="55%" border="0" class="query" cellspacing="2" cellpadding="2">
<tr>
<td colspan="5"><h3>Lookup Mailer</h3></td>
</tr>
<tr>
<td colspan="5"><hr /></td>
</tr>
<tr>
<td colspan="1" align="center"><b><a href="Mailer.asp">Create new Mailer</a></b></td>
<td colspan="1" align="center"><b>|</b></td>
<td colspan="1" align="center"><b><a href="AttachToMailer.asp?type=reviewMailers" target="_blank">Export Mailer contacts to XSL</a></b></td>
<td colspan="1" align="center"><b>|</b></td>
<td colspan="1" align="center"><b><a href="MailerReports.asp" target="_blank">Mailer Reports</a></b></td>
</tr>
</table>
<table width="55%" border="0" class="query" cellspacing="2" cellpadding="2">
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="2" class=ContactBoldText align="center">Field</td>
<td class=ContactBoldText>Operator</td>
<td class=ContactBoldText> </td>
</tr>
<tr>
<td>NOT:<input type="checkbox" name="not1" /></td>
<td>
<select name="select1">
<option value="select"></option>
<option value="Rooms_From">Rooms From</option>
<option value="TypeofHome">Type of Home</option>
<option value="Contact_Type">Contact Type</option>
<option value="idstatus">Ref Num</option>
<option value="Rooms_To">Rooms To</option>
<option value="Price_From">Price From</option>
<option value="Price_To">Price To</option>
<option value="Price">Price</option>
<option value="Geography">Location</option>
</select>
</td>
<td>
<select name="operator1">
<option value="selectoperator1"></option>
<option value="=">Equal</option>
<option value="contains">Contains</option>
<option value=">=">Greater Than</option>
<option value="<=">Less Than</option>
<option value="startswith">Starts With</option>
<option value="">Is Blank</option>
</select>
</td>
<td>
<input type="text" size="50" name="userselect1" value="2" /> AND <input type="radio" checked name="andor1" value="AND" /> Or: <input type="radio" name="andor1" value="OR" />
</td>
</tr>
<tr>
<td>NOT:<input type="checkbox" name="not2" /></td>
<td>
<select name="select2">
<option value="select"></option>
<option value="idstatus">Ref Num</option>
<option value="TypeofHome">Type of Home</option>
<option value="Contact_Type">Contact Type</option>
<option value="Rooms_From">Rooms From</option>
<option value="Rooms_To">Rooms To</option>
<option value="Price_From">Price From</option>
<option value="Price_To">Price To</option>
<option value="Price">Price</option>
<option value="Geography">Location</option>
</select>
</td>
<td>
<select name="operator2">
<option value="selectoperator2"></option>
<option value="=">Equal</option>
<option value="contains">Contains</option>
<option value=">=">Greater Than</option>
<option value="<=">Less Than</option>
<option value="startswith">Starts With</option>
<option value="">Is Blank</option>
</select>
</td>
<td>
<input type="text" size="50" name="userselect2" value="3" /> AND <input type="radio" checked name="andor2" value="AND" /> Or: <input type="radio" name="andor2" value="OR" />
</td>
</tr>
<tr>
<td>NOT:<input type="checkbox" name="not3" /></td>
<td>
<select name="select3">
<option value="select"></option>
<option value="TypeofHome">Type of Home</option>
<option value="Contact_Type">Contact Type</option>
<option value="idstatus">Ref Num</option>
<option value="Rooms_From">Rooms From</option>
<option value="Rooms_To">Rooms To</option>
<option value="Price_From">Price From</option>
<option value="Price_To">Price To</option>
<option value="Price">Price</option>
<option value="Geography">Location</option>
</select>
</td>
<td>
<select name="operator3">
<option value="selectoperator3"></option>
<option value="=">Equal</option>
<option value="LIKE">Contains</option>
<option value=">=">Greater Than</option>
<option value="<=">Less Than</option>
<option value="STARTSWITH">Starts With</option>
<option value="">Is Blank</option>
</select>
</td>
<td>
<input type="text" size="50" name="userselect3" /> AND <input type="radio" checked name="andor3" value="AND" /> Or: <input type="radio" name="andor3" value="OR" />
</td>
</tr>
<tr>
<td>NOT:<input type="checkbox" name="not4" /></td>
<td>
<select name="select4">
<option value="select"></option>
<option value="TypeofHome">Type of Home</option>
<option value="Contact_Type">Contact Type</option>
<option value="idstatus">Ref Num</option>
<option value="Rooms_From">Rooms From</option>
<option value="Rooms_To">Rooms To</option>
<option value="Price_From">Price From</option>
<option value="Price_To">Price To</option>
<option value="Price">Price</option>
<option value="Geography">Location</option>
</select>
</td>
<td>
<select name="operator4">
<option value="selectoperator4"></option>
<option value="=">Equal</option>
<option value="LIKE">Contains</option>
<option value=">=">Greater Than</option>
<option value="<=">Less Than</option>
<option value="STARTSWITH">Starts With</option>
<option value="">Is Blank</option>
</select>
</td>
<td>
<input type="text" size="50" name="userselect4" /> AND <input type="radio" checked name="andor4" value="AND" /> Or: <input type="radio" name="andor4" value="OR" />
</td>
</tr>
<tr>
<td>NOT:<input type="checkbox" name="not5" /></td>
<td>
<select name="select5">
<option value="select"></option>
<option value="TypeofHome">Type of Home</option>
<option value="Contact_Type">Contact Type</option>
<option value="idstatus">Ref Num</option>
<option value="Rooms_From">Rooms From</option>
<option value="Rooms_To">Rooms To</option>
<option value="Price_From">Price From</option>
<option value="Price_To">Price To</option>
<option value="Price">Price</option>
<option value="Geography">Location</option>
</select>
</td>
<td>
<select name="operator5">
<option value="selectoperator5"></option>
<option value="=">Equal</option>
<option value="LIKE">Contains</option>
<option value=">=">Greater Than</option>
<option value="<=">Less Than</option>
<option value="STARTSWITH">Starts With</option>
<option value="">Is Blank</option>
</select>
</td>
<td>
<input type="text" size="50" name="userselect5" /><!-- AND <input type="radio" checked name="andor5" value="AND" /> Or: <input type="radio" name="andor5" value="OR" />-->
</td>
</tr>
<tr>
<td colspan="2" align="left">Select the sort field:
<select name="orderby">
<option value=""></option>
<option value="TypeofHome">Type of Home</option>
<option value="Contact_Type">Contact Type</option>
<option value="idstatus">Ref Num</option>
<option value="Rooms_From">Rooms From</option>
<option value="Rooms_To">Rooms To</option>
<option value="Price_From">Price From</option>
<option value="Price_To">Price To</option>
<option value="Price">Price</option>
<option value="Geography">Location</option>
</select> </td>
<td colspan="2" align="center"><input type="submit" onFocus="zerocorrection()" class="btn" value="Run Query" /></td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
</table>
</form>
<form name="results" method="post" onSubmit="openTarget(this, 'width=400,height=400,resizable=1,scrollbars=1'); return true;" target="newpopup" action="AttachToMailer.asp?type=SearchMailers">
<table width="90%" class="results">
<tr>
<td colspan="6"> </td>
</tr>
<tr>
<td width="2%"> </td>
<td width="15%"><h6>Contact</h6></td>
<td width="10%"><h6>Rooms From</h6></td>
<td width="10%"><h6>Ref Num</h6></td>
<td width="10%"><h6>Price from</h6></td>
<td width="10%"><h6>Price</h6></td>
</tr>
<%
if objRS.EOF and objRS.BOF then
response.write("Your search has returned no results, ")
response.write(" please re search the database using a different criteria.")
else
'***************************************
'start the loop in the recordset here
'***************************************
If Len(request.querystring("records")) = 0 then
objRS.AbsolutePage = 1
Else
If CInt(request.querystring("records")) <= objRS.PageCount then
objRS.AbsolutePage = request.querystring("records")
Else
objRS.AbsolutePage = 1
End if
End if
abspage = objRS.AbsolutePage
pagecnt = objRS.PageCount
'****************ARRAY TO MANAGE CHECKBOXES
'Dim myArray(3)
'myArray(0) = "Item 1"
'myArray(1) = "Item 2"
'myArray(2) = "Item 3"
'myArray(3) = "Item 4"
'Now lets Join them using a comma. You can use any other character that you wish to use
'data = join(myarray, ",")
'Now lets send this data to another page
'Response.redirect "nextpage.asp?data="&data
'Nextpage
'Now lets retrieve the data
'newdata = request.querystring("data")
'Lets Split them
'newarray = split(newdata,",")
'You can process the data in your array as you like.
'***************************************
'set this up to mirror what you are wanting in the display
'***************************************
For I = 1 to objRS.PageSize
If Not objRS.EOF Then
strBGcolour = "#D0D0D0"
Response.Write("<tr><td bgcolor='" & strBGColour & "'><input type='checkbox' name='uniqueid' value='" & objRS("uniqueid") & "' /></td><td bgcolor='" & strBGColour & "'>" & objRS("contact") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("rooms_from") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("idstatus") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("price_from") & "</td><td bgcolor='" & strBGColour & "'>" & objRS("price") & "</td></tr>")
objRS.movenext
end if
Next
'***************************************
'end the loop in the recordset here and close the objects
'***************************************
end if
objRS.close
set objRS = nothing
'********************************************************
'put the navigation links on the bottom of the page here
'********************************************************
Response.Write "<div align='right'>" & vbcrlf
Response.Write "<a href='"
Response.Write "MailerLookup.asp"
Response.Write "?sqlquery="&(Session("test"))&"&Query=" & request.querystring("Query") & _
"'>First Page</a>"
Response.Write " | "
If abspage = 1 Then
Response.Write "<span style='color:silver;'>Previous Page</span>"
Else
Response.Write "<a href='" & Request.ServerVariables("SCRIPT_NAME")&"?records=" & abspage - 1 &"&sqlquery="&(Session("test"))&"'>Previous Page</a>"
End If
Response.Write " | "
If abspage < pagecnt Then
Response.Write "<a href='" & Request.ServerVariables("SCRIPT_NAME")&"?Query=" & request.querystring("Query")&"&sqlquery="&(Session("test"))&"&records=" & abspage + 1 & "" & "' onClick='submitform()'>Next Page</a>"
Else
Response.Write "<span style='color:silver;'>Next Page</span>"
End If
Response.Write " | "
Response.Write "<a href='" & Request.ServerVariables("SCRIPT_NAME")&"?Query=" & request.querystring("Query")&"&sqlquery="&(Session("test"))&"&records=" & pagecnt & "'>Last Page</a>"
Response.Write "</div>"
'********************************************************
'end the navigation links on the bottom of the page here
'********************************************************
%>
<tr>
<td colspan='6' align="right"><input type="checkbox" name="checkbox" onclick="checkAll()" ></td>
</tr>
<tr>
<!--<td colspan='3' align="right"><a href="#" onClick="myPopup()">Find Mailer to attach to selected lookup</a></td>-->
<td colspan="6" align="center"><input type="Submit" class="btn" value="Select Mailer" /></td>
</tr>
</table>
</form>
</body>
</html>
<%
'End If
%>