View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
The following information is from the Troubleshooting page of the FoxWeb 1.29c documentation:
Spaces disappear after HTML is processed by the MergeTxt() function
This problem usually occurs if you are trying to merge output generated by a loop into HTML in a memo field, and it has to do with VFP's MEMLIMIT value. If a line is longer than this value then it is wrapped at the closest space and the space character is removed from the output. Since browsers ignore CHR(13) characters that are outside <PRE> tags, the result appears as a missing space everywhere a line is wrapped.
 
The trick is to manually break long lines by placing CHR(13) characters every once in a while so that VFP does not wrap your text. If the output is generated by a FOR/NEXT or SCAN/ENDSCAN loop then add a CHR(13) after each iteration of the loop:
 
SCAN
    text = text+"<FONT..."+field+"</FONT>"+CHR(13)
ENDSCAN
 
Please note that this problem does not affect FWX scripts in FoxWeb 2.X.

FoxWeb Support Team
support@foxweb.com email

Sent by Willem Van Oosten on 11/26/2003 12:15:27 PM:
I use Foxweb 1.29c, I am very happy with it, it does everything I need.
I have a problem with the mergetxt() function after I have put some javascript in the top of a .mrg file.
I fill a variable mlisttxt with html code to build a (html)table for as many records a necessary, the contents of mlisttxt can get as big as 400 lines with more than 80 characters.
In these lines in mlisttxt I have words like <td align=  to generate a nice looking html table.
With the mergetxt() function I put mlisttxt together with a .mrg file into
html_out to build a nice looking page.
 
Sometimes the page generated by foxweb looks strange because one (and only one of several hundreds)
<td align= shows to be converted to <tdalign=, the space between TD and ALIGN is gone, resulting in incorrect html code.
 
I wrote the variable mlisttxt and html_out into the memofields of a debug database, it shows that mlisttxt has the space in <td align= in it, while html_out (after the mergetxt()) contains a <tdalign= in the cell where the html table is messed up.
 
Is it possible that some of the javascript characters in the .mrg file interfere with  the mergetxt() function?
I also found out that the CRLF I put after each row </tr> to keep the page source readable,  is ignored, the source is one big wide mess, while when I didn't add the javascript in the .mrg file yet everyting looked fine.
 
does this sound familiar to anyone?
(probably time for an upgrade I think)
 
Willem