Am 13.07.2005 um 18:58 schrieb JOHN HART:
Hi List...
D8.5.1/WinXPpro
I have plain text in a field, in a projector. Is there any way, using
Lingo or Javascript, to extract the plain text and create a new html
page from that text? My next step would be to upload the html page to
a server using something like DirectFTP. The goal is to automatically
extract the text, convert to HTML, and have it appear live on the web.
the easiest way is using a #text member to do the conversion to html
for you.
t = new(#text)
t.text = member("yourfield").text
theHTMLString = t.html
t.erase()
--- you could even add some links, if you want:
t.word[10].hyperlink = "http://www.macromedia.com"
-- or formatting:
t.word[10].color = rgb(200, 0, 0)
t.word[10].fontstyle = [#bold]
--------
now you have a valid html page in <theHTMLString>.
although the bad news, is that the style is some years old now and it
has some flaws.
but for a simple html page text-only it should be OK.
as an alternative to directFTP, you could have a cgi or php script on
the server, which you send the html string to using postnettext and
which writes the file to the server then.
---------------------------
|||
a¿ex
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]