View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Yes, it would require a change to your FoxWeb script.  My assumption is that your existing script already uses a default sort order.  The change would involve the use of the 'sort' query string field to determine the sort order:
 
M.SortOrder = Request.QueryString("sort")
IF EMPTY(M.SortOrder)
* Default sort order is by 'cust'
M.SortOrder = 'cust'
ENDIF
SQLStatement = "SELECT * FROM project " + ;
ORDER BY " + M.SortOrder + " INTO CURSOR MyList"
&SQLStatement
 
 

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 09/29/2004 10:31:24 AM:
Thanks, Would this require any mods to my fwx? I am certainly not an html genious but does you href reference  below be taken literally with the exception of substituting "mylist" to my actual prg/fwx?
 
 
 
t by FoxWeb Support on 09/28/2004 06:15:09 PM:
You can turn the headers into links that point back to the same fwx file, but pass an additional query string field back to the server.  For example:
 
<a href="myList.fwx?filter=XXX&sort=status">STATUS</a>
 
Obviously this requires a round trip to the server, but in most cases this is how it is done.  I have seen sorting performed on the client, but it involved the use of advanced JavaScript, XML and XSLT techniques.  The client-side technique involves more work than the server-side method and it does not work with all browsers.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 09/28/2004 01:22:44 PM:
I want to be able to  include clickable sort header titles to my output. So if a user gets results returned like you see here
 
              STATUS          NOUN                        CUST      OFFICE          EDD              JOB          PRICE
4VS5639  OPEN    TONER CARTRIDGE         BOWEN     VSOSR    10/1/04    DT1C3VS0     62.00
4VS5621  OPEN    PRINTER, LASER          BOWEN     VSOSR    10/22/04   DT1C4VS0     578.00
 
I want them to be able to click on STATUS header and it will sort the data by status.
Easily done?