Load local HTML file
coiin at verizon.net
Thu Jul 26 22:55:41 EDT 2012
For an exact answer to your question, read the dictionary entries for "open file", "read from file", and "close file". A simple case might like this:
put "path to file" into f
open file f
read from file f until EOF
close file f
'it' now contains the contents of that text file. You'll see in the help entries that you can read from binary files, and other flexible options.
Getting onto your need though, if you want to set a field to look like the contents of an html file, you can do this:
set the htmltext of field "a field" to url "path to html file"
That html could be local, or across the world. This works for example:
set the htmltext of fld 1 to url "http://www.magicgate.com/"
Now, the html on your home page isn't exactly geared for displaying in a field, but with simpler html it would end up looking right.
On Jul 26, 2012, at 9:43 PM, Magicgate Software - Skip Kimpel <skip at magicgate.com> wrote:
> I am trying to load a local HTML file in my stack... How do you refer
> to it properly? Let's say that the LC file is in the same directory
> as the HTML file...
More information about the Use-livecode