Passing Form Strings through on the same page
I am making some changes to this code. I am trying to filter a table
that is being displayed. The selection is based on radio button
selections. Once selected, the variable for each one passes
through the query string.
How do I read posted values from the radio buttons on the same page if
this is possible. This would be the first question.
Next, how would you code it to actually show ALL, PENDING (per EMPLOYEE w/sorted Emplyee field), and all active clients.
Here is the Code:
<%
'11 is the DocumentTypeID for Send Info
sql = " Select c.ClientID,corrID, Client,DocumentType, UploadTime, Description, FName, LName,email "
sql = sql & " From mcci_Correspondence c, mcci_Clients cl, mcci_DocumentType d, mcci_Employees E "
sql = sql & " Where d.DocumentTypeID = 132 "
sql = sql & " AND d.DocumentTypeID = c.DocumentTypeID "
sql = sql & " AND c.ClientID = cl.ClientID "
sql = sql & " AND e.EmployeeID = c.EmployeeID "
sql = sql & " AND c.SendInfoCompleted = 0 "
sql = sql & " order by uploadtime desc"
Set jobCartRS = Server.CreateObject("ADODB.Recordset")
jobCartRS.Open sql, cn
%>
Please Choose your filter settings
<form method="GET" action="sendinfocart.asp" name="PO">
<input type="radio" name="Filter" value="1" onclick="submit();"> Show All
<br>
<input type="radio" name="Filter" value="2" onclick="submit();"> Show Pending
<br>
<input type="radio" name="Filter" value="3"onclick="submit();" checked> Active Only
</form>
<%
Dim Cart
Cart = Request.Querystring("Filter")
Response.write "Filter"
%>
<body>
<div>
<%if jobcartRS.EOF = False then%>
<table id="jobTable" border="1px" style="text-align: center">
<tr style="font-weight: bold">
<td><span >Client</span></td>
<td><span>Document Type</span></td>
<td><span>Upload Time</span></td>
<td><span>Employee</span></td>
<td><span>Description</span></td>
<td><span>Uploaded By</span></td>
</tr>
<%Do while not jobCartRS.EOF
ClientID = jobCartRS("ClientID")
corrID = jobCartRS("corrID")
Client = jobCartRS("Client")
UploadTime = jobCartRS("UploadTime")
Description = Left(jobCartRS("Description"),20)
DocType = jobCartRS("DocumentType")
Emp = jobCartRS("FName") & " " & jobCartRS("LName")
Email = jobcartRS("email")
%>
<tr>
<td> <a href="/client/clientInfo.asp?clientID=<%=clientID%>"><%=Client%> </a></td>
<td> <a href="/correspondence/UpdateCorr.asp?corrID=<%=corrID%>"><%=DocType%></a></td>
<td> <%=UploadTime%></td>
<td> <%=Emp%></td>
<td style="color:blue; text-decoration: underline;" onmouseover="showPointer(this)" onmouseout="hidePointer(this)" onclick="launchDescriptionInNewWindow(this)" corrId="<%=corrId%>" email="<%=email%>"><%=Description%> </td>
<td> <a href="mailto:<%=email%>"><%=email%></a></td>
</tr>
<%jobCartRS.MoveNext
loop%>
</table>
Marvin L. Perry Jr.
|