Can't figure out....need a sorting table with

Results 1 to 7 of 7

Thread: Can't figure out....need a sorting table with

  1. #1
    Dida Guest

    Default Can't figure out....need a sorting table with

    Please help me!<BR><BR>This is the result I am trying to get:<BR><BR>I need to have my records display onto a table with these fields: ID, Title, Contact, Date<BR><BR>I need to have these sortable by the user, by either up/down arrows or by clicking on the headers, I don&#039;t care which.<BR><BR>I need the user to also be able to either click on an icon or the &#039;ID&#039; in each row, to link to a &#039;detail&#039; page for that record.<BR><BR>I have tried many, many different things, and have spent a great deal of time searching the web. I have been using ASP for 2 months, and I&#039;m not bad, but I am not an expert. I have tried SQL statements, which work for half of what I want. I have tried Javascripts from a posting here yesterday, but I still had trouble.<BR><BR>Can anyone please help me, or point in me a direction????<BR><BR>Thanks!!!

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default ONLY cause you said please :)

    read this<BR><BR>

  3. #3
    Dida Guest

    Default RE: ONLY cause you said please :)

    I have read this one (well-written) before, but I admit that I have not tried it, it did not seem to exactly what I am looking for, but you know what...I will give it a try. I&#039;m sure I can modify for my purposes.<BR><BR>Many thanks for such a swift response!

  4. #4
    Join Date
    Dec 1969

    Default Another Place you could look

    This may be another example of what you are looking for.<BR>

  5. #5
    Dida Guest

    Default You guys are good!

    Amazing, I tried this yesterday as well, and I could not get it to work, but I&#039;ll give this one another try, since my brain is still fresh and coated with caffine.<BR><BR>Thank you for your help as well :)

  6. #6
    ADrian Guest

    Default Had same problem before

    Dida,<BR><BR>I had same prob before and used code from both the sources above. If u want the code send me an email. (Fairly lenghty so i don&#039;t want to post it)<BR><BR>Adrian<BR>(

  7. #7
    Reggie Guest

    Default You can do it with radio buttons like this

    Test this code in a file named test.asp (the form has to post to itself). You can take out the radio buttons and exchange them for images, then just make those respond to the onClick() event. And of course instead of just printing the SQL statement, your goal would be to execute it.<BR><BR>&#060;form action="test.asp" method="post" name="pname"&#062;<BR>&#060;input type="radio" &#060;%if request.form("sortby")="ID" then%&#062;checked&#060;%end if%&#062; onClick="document.pname.submit()" name="sortby" value="ID"&#062;ID<BR>&#060;input type="radio" &#060;%if request.form("sortby")="Name" then%&#062;checked&#060;%end if%&#062; onClick="document.pname.submit()" name="sortby" value="Name"&#062;Name<BR>&#060;input type="radio" &#060;%if request.form("sortby")="Location" then%&#062;checked&#060;%end if%&#062; onClick="document.pname.submit()" name="sortby" value="Location"&#062;Location<BR>&#060;/form&#062;<BR><BR>&#060;%<BR>if request.form("sortby")="ID" then<BR>SQL_query = "SELECT * FROM myDB ORDER BY ID"<BR>elseif request.form("sortby")="Name" then<BR>SQL_query = "SELECT * FROM myDB ORDER BY Name"<BR>elseif request.form("sortby")="Location" then<BR>SQL_query = "SELECT * FROM myDB ORDER BY Location"<BR>else<BR>SQL_query = "SELECT * FROM myDB"<BR>end if<BR><BR>Response.write SQL_query<BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts