Background rendering of a web page for email
Mike Myers
myersm at optonline.net
Tue Mar 12 09:47:43 PST 2002
I have reached a point where I can't see the forest through the trees. A
little advice would be appreciated!
Using: Frontier 8.05 on Windows NT.
In response to a web form submission, I want to render a web page behind the
scenes, grab the HTML, and mail it to a recipient(s) via tcp.sendMail. The
HTML returned to the browser is not identical to what gets emailed.
I *could* create the HTML for the email msg entirely from scratch in
UserTalk, but there are obvious advantages to relying on Frontier's website
framework to handle the rendering (templates, macros, the glossary). I'm
trying to arrive at the most simple architecture.
Submit Form 1 --> Present Form 2
(user enters email recipients, chooses formatting options)
(selections from Form 1 passed through as hidden inputs)
Submit Form 2 --> Render HTML based on selections captured from Forms 1 & 2.
(Need to set some page table elements dynamically.)
Email that HTML to specified recipient(s).
Return some other HTML to browser
eg. a summary, or return to page containing Form 1.
I'm unsure of what approach to take in the "behind-the-scenes" rendering
after submission of Form 2.
-- if I create a page table dynamically from scratch,
can I render it and capture the result string
(ala html.buildOnepage())? What are the minimal
elements required for a page table to function?
-- create a physical website in the odb to act as a placeholder,
then use tcp.httpClient() to post the collected data to this
web address. Email the returned HTML. Downside: I might have to
create several different placeholders to hold their respective
prefs/customizations. Any time I create a new subsite, I would
have to create a corresponding dummy placeholder site. Tedious.
-- other suggestions?
I have all the rendering code written, now I need to piece it all together.
TIA,
mpm
More information about the Frontier-Users
mailing list