Hi all;
I'm trying to update a .htm file with info the user provides. Found this code in the Forum and it works well.
-- Load in your html file
SourceFile = TextFile.ReadToString("AutoPlay\\Docs\\FMP.htm")
-- get the data from our input fields
text1 = Input.GetText("Input1");
-- Find and replace the text
result = String.Replace(SourceFile, "Pers_Chrg", text1, true);
-- Save the file
TextFile.WriteFromString("AutoPlay\\Docs\\FMP2.htm ", result, false)
Problem is I need to replace several sections of the SourceFile (Pers_Chrg, Address1, Address2, City, State, Zip, Phone, etc.)
Am I going about this the "right" way? How would one go about getting all the info into the file?
Regards
Jim Smiley
I'm trying to update a .htm file with info the user provides. Found this code in the Forum and it works well.
-- Load in your html file
SourceFile = TextFile.ReadToString("AutoPlay\\Docs\\FMP.htm")
-- get the data from our input fields
text1 = Input.GetText("Input1");
-- Find and replace the text
result = String.Replace(SourceFile, "Pers_Chrg", text1, true);
-- Save the file
TextFile.WriteFromString("AutoPlay\\Docs\\FMP2.htm ", result, false)
Problem is I need to replace several sections of the SourceFile (Pers_Chrg, Address1, Address2, City, State, Zip, Phone, etc.)
Am I going about this the "right" way? How would one go about getting all the info into the file?
Regards
Jim Smiley
Comment