View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Yes, this is correct.  By the way, this thread is so long that it is indenting past the width of the column.  If you want to continue it, please respond to your top level message instead of this one.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/25/2004 08:33:35 AM:
So if a page returns 8 unique columns worth of info with each column having a hyperlinked header such as status, custname,price, date of order, date of delivery, costctr etc... to sort on, this is going to cause quite a complex html out line isn't it becasue the previous page, there are about 13 input textboxes for the user to fill out plus checkboxes and dropdown choices as well to narrow his search down.
 
 
Sent by FoxWeb Support on 10/14/2004 05:26:09 PM:
As you guessed, your script has no way of knowing what was passed to it from the previous request.  What you need to do is pass the same information in the query string of the link.
 
For example, lets assume that the original request contained the name of the table you want to display in a form field called TableName.  All you need to do is pass that same field in the QueryString area of the URL:
 
M.TableName = Request.Item('TableName')
M.SortOrder = Request.Item('SortOrder')
... code that generates your SQL statement ...
html_out = html_out + ;
    '<pre>'+'<font color="green">' + ;
    '<A HREF="qq1.fwx?filter=b&SortOrder=status&tablename=' + ;
    M.TableName + '">STATUS</a>' ...
 
To simplify your code I recommend that you use Request.Item('TableName') instead of Request.Form and Request.QueryString.  The Request.Item method looks in both the form data and the query string, so you can retrieve both with a single call.
 
In this example I'm only passing the table name, but you obviously need to pass all information that is relevant to your query, such as filter conditions, etc.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/14/2004 08:12:36 AM:
So my quest is now: Do I need to redefine all the vars that brought me to the listing page in the first place? Becasue when I click on the hypertext to refer back(reload) to the calling fwx, it does not know the value of the vars.
 
 
 
Sent by FoxWeb Support on 10/12/2004 02:06:32 PM:
I don't see any problems that would cause a timeout, but the error may be elsewhere in the code.
 
I think you looked at the wrong article in the documentation.  I was not pointing you to the errors page, but to the following text.  The fastest and easiest way to find out what is causing a channel to hang is to make it visible and look for dialog boxes:
 

Hanging channels, or channels that get restarted often:
The problem is probably related to your channels hanging because of one of the reasons outlined in the Illegal Commands chapter. The easiest way to isolate the offending code is to disable the "Run as Service" and "hide Channels" options in the FoxWeb configuration and then restart FoxWeb. You should now be able to see a separate icon for each channel in the task bar. Size and arrange the channel windows on your screen, so that they are all visible at the same time.
Call the offending script and then minimize your browser window, so that the channel windows are visible. Look for a dialog box, or other indication that a channel is waiting for user input. In most cases, the script tries to use a table that is not open, which causes the Open Table dialog to pop up, halting script execution.
If you can't find a visual indication of the problem, then you may need to trace through your script, using the techniques described in the Troubleshooting chapter.
Once you isolate and fix the problem, you can re-enable the above configuration options as necessary.

 

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/12/2004 01:46:17 PM:
yes sir, I checked out the errors page. Not sure it relates though. But do you see any error in my modified line?
 
Sent by FoxWeb Support on 10/12/2004 12:44:01 PM:
Have you tried the troublshooting method described in the Common Problems page (see below)?  It's impossible for us to provide any additional guidance without your help.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/12/2004 12:27:54 PM:
Everything is working perfect until I modify the code(qq1.fwx) to what you suggested which is to insert:
 
 "<a href="myList.fwx?filter=XXX&sort=status">STATUS</a>" into the mix.
 
my existing line is html_out = html_out +'<pre>'+'<font color="green">'+'PRICE'+'   '+'STATUS'+'  '
 
 so I end up with this:
 
html_out = html_out +'<pre>'+'<font color="green">'+'<A HREF="https://lmca-server4/lmca/qq1.fwx?filter=bsortorder=status">STATUS</a>'  etc etc etc
 
Can you tell me where my modification is incorrect?
Thanks again
 
 
Sent by FoxWeb Support on 10/09/2004 02:29:22 PM:
I never said that there's a problem with your data file.  What I said is that something in the code causes the channel to hand -- probably because it brings up a dialog box.  Please refer to the section of the documentation that I mentioned in my previous reply:
 
'Hanging Channels, or Channels that Get Restarted Often' section of the Common Problems page of the FoxWeb documentation.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/08/2004 06:39:25 AM:
There are no probs with my dbf. My script is working perfect until I modify the line you suggested earlier in this post to allow user to click on hypertexted "STATUS" for sort purposes. My orig line reads:
 html_out = html_out +'<pre>'+'<font color="green">'+'<A HREF="https://lmca-server4/lmca/q2.fwx'+lmca_nbr+'">'+"LMCA"+'</A>' +'   '+'STATUS'
this is just a header line and it works perfect. Hope  I am explaining myself proficiently enough?
 
Sent by FoxWeb Support on 10/07/2004 03:36:10 PM:
It's impossible to tell what is going wrong from the code you submitted, but my guess is that your code is failing and causing a popup dialog to appear and pausing channel execution indefinitely.  Eventually the request times out and the channel gets restarted.  Could it be that the mDBFyear variable is not populated properly?
 
For information on this topic and ideas on how to troubleshoot such problems please refer the Hanging Channels, or Channels that Get Restarted Often section of the Common Problems page of the FoxWeb documentation.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/07/2004 01:51:41 PM:
The single quote was really there in my actual code. I AM using v2.0 but my existing code from previous ver remains. Is this ok? now my html code looks like this:
html_out = html_out +'<pre>'+'<font color="green">'+'<A HREF="https://lmca-server4/lmca/qq1.fwx?filter=bsortorder=lmca_nbr">LMCA-NBR</a>'
and I've changed the fwx to reflect this :
bSortOrder = Request.QueryString("bsortorder") and my result is
 
FoxWeb Message

The FoxWeb Service has returned the following message:

FoxWeb Timed Out--
 
Sent by FoxWeb Support on 10/07/2004 12:42:08 PM:
Your code looks for Request.QueryString("sort"), but you are using the html_out variable to return content to the browser, which is probably an indication that you are using FoxWeb 1.29c.  The Request object was introduced in FoxWeb 2.0.  For older versions you must use the FormField function, or manually parse the CGI.QueryString property.
 
Also, your code is looking for a QueryString field called "sort", but your URL contains the sort order in a field called "bsortorder".
 
And by the way, you are still missing a single quote at the end of your html_out string after the </A> tag.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/07/2004 07:24:37 AM:
the ";" was becasue it continued on the next line, I was just giving you the text I am concerned with. My code in qq1.fwx is as follows:
bSortOrder = Request.QueryString("sort")
IF EMPTY(bSortOrder)
bSortOrder = 'price'
ENDIF
 SELECT lmca_nbr,status,remarks,price;
 FROM &mDBFyear ORDER BY &bSortOrder;
INTO CURSOR results
html_out = html_out +'<pre>'+'<font color="green">'+'<A; HREF="https://lmca-server4/lmca/qq1.fwx?filter=XXX&bsortorder=status">STATUS</a>
 
when the user clicks on the hyperlinked "STATUS"  a timeout occurs, does something look suspect to you?
 
 
 
 
Sent by FoxWeb Support on 10/06/2004 04:59:11 PM:
You are not giving us enough information, but it does seem that you are missing a quote at the end of your string.  Also, what's the semi-colon for?

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/06/2004 08:54:02 AM:
Thats what I figured but I must be doing something wrong becasue I keep getting a timeout. Can you kindly tell me my syntactical error in this line?
 
html_out = html_out +'<pre>'+'<font color="green">'+'<A HREF="https://lmca-server4/lmca/qq1.fwx?filter=XXX&bsortorder=status">STATUS</a>;
 
bsortorder gets defined in qq1.fwx(prg)
 
 
 
Sent by FoxWeb Support on 10/05/2004 10:49:02 PM:
As you can see, the link points back to the fwx file.  When it receives such a request, your script should re-create the page, sorted by the field specified in 'sort=xxxx'.

FoxWeb Support Team
support@foxweb.com email

Sent by Tim Bowen on 10/05/2004 10:47:03 AM:
does it make the fwx call itself again?
 
Sent 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?