Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 22nd, 2006, 12:58 PM
Registered User
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to perryml
Default 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>&nbsp;<a href="/client/clientInfo.asp?clientID=<%=clientID%>"><%=Client%> </a></td>
    <td>&nbsp;<a href="/correspondence/UpdateCorr.asp?corrID=<%=corrID%>"><%=DocType%></a></td>
    <td>&nbsp;<%=UploadTime%></td>
    <td>&nbsp;<%=Emp%></td>
    <td style="color:blue; text-decoration: underline;" onmouseover="showPointer(this)" onmouseout="hidePointer(this)" onclick="launchDescriptionInNewWindow(this)" corrId="<%=corrId%>" email="<%=email%>"><%=Description%>&nbsp;</td>
    <td>&nbsp;<a href="mailto:<%=email%>"><%=email%></a></td>
 </tr>

  <%jobCartRS.MoveNext
                loop%>

</table>

Marvin L. Perry Jr.





Similar Threads
Thread Thread Starter Forum Replies Last Post
passing unique record from form to form Baconant Beginning VB 6 1 January 2nd, 2008 06:20 PM
Passing Value from main form to Popup Form smartgir Access VBA 0 February 26th, 2004 06:26 PM
Passing an Array of Strings to a WebService rmau Excel VBA 0 October 27th, 2003 03:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.