Date:  05/29/2015 04:11:46 PM Msg ID:  004807
From:  Art Bergquist Thread:  004805
Subject:  Re: Web page to edit an HTML file
Sorry, I may have misconveyed the scenario; we already do the following with no problem: 
  • Display dynamic content, some of which is read from a separate HTML file.
 I'm looking for help on doing the following:
  • Provide the ability to edit an HTML file.
Sent by FoxWeb Support on 05/29/2015 04:05:50 PM:
You are dealing with two distinct functions:
  1. Display dynamic content, some of which is read from a separate HTML file.
  2. Provide the ability to edit an HTML file.
There only thing the two functions have in common is that they read the same HTML file, which is achieved with a single line of code. Are you trying to combine the two functions simply to encapsulate related functionality in a single file, or is it so that you can display an Edit link in the dynamically generated output of function #1 above? If it's the latter, then you can still break the two functions in two separate .fwx files. One would perform function 1 and also return a link that would point to the second file, which would perform function 2 and then re-direct or link to the first file.
FoxWeb Support Team email
Sent by Art Bergquist on 05/29/2015 03:19:41 PM:
 Hi all,
I've been maintaining a FoxWeb web site for a while now.  I am confident in the fixing/enhancing of existing web pages within the site and have also implemented some new web pages.
A particular new web page has, for some reason, proven a bit more challenging for me.  We are currently maintaining an HTML file that is read by an .FWx file; the .FWx file incorporates the contents of the HTML file (primarily, text and links) and combines it with other HTML which it then renders.  That all works fine.
We now want to enable the client to edit the HTML file himself (that way, he doesn't have to communicate the changes to me and wait until I get a chance to do that myself).
Specifically, I want to implement a web page that does the following:
  1. reads the contents of the HTML file and displays them in an edit box
  2. allows the user to modify that HTML within the edit box
  3. when the user clicks [Save], overwrites the HTML file on the web server with the new HTML
Can I do the above via one (1) .FWx or does it require two (2) .FWx files?
Art Bergquist