Revlet save a txt file

Richard Gaskin ambassador at fourthworld.com
Sun Jul 26 13:51:00 EDT 2009


Yves COPPE wrote:

> 1) how can I save the txt file on my personal web site  (it is not a  
> rev-server)

Two ways to send data to a server are FTP and POST via HTTP.  From 
anything running on a public client FTP would expose your password 
unnecessarily, so using POST to send the data to a CGI would probably be 
the better option.

> 2) how can I easily transform the tab-return file in html format to  
> incorporate the table in a html page

You could walk through the data and put the necessary HTML tags around 
the data with a function like this:

function TabToHtmlTable pData
   set the itemdel to tab
   put "<table>"&cr into tHtml
   repeat for each line tLine in pData
     put "<tr>" after tHtml
     repeat for each item tItem in tLine
       put "<td>"& tItem &"</td>" after tHtml
     end repeat
     put "</tr>"&cr after tHtml
   end repeat
   put "</table>" after tHtml
   return tHtml
end TabToHtmlTable


--
  Richard Gaskin
  Fourth World
  Revolution training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com



More information about the use-livecode mailing list