Greetings.
I know it’s possible and I kind of got it to work- but this is a bit tricky…
I have pre-formatted HTML in a textfile. Let me know if any of this might already be an error-source- I am currently too tired to try out alternatives:
the textfile looks something like this:
<p><img src='biathlon' vspace='2' hspace='4' width='40' height='40'></img>Alot of text</p>
<p><br></p>
<p><img src='biathlon' vspace='2' hspace='4' width='40' height='40'></img>Even MORE Text</p>
<p><br></p>
it’s saved as a “.txt”-file… I didn’t think that would really make a difference?
What I want to do is load the file and dump it directly to an HTML-enabled textfield, using something like
if (loaded) {
TickerData_txt.htmlText = this;
}
in the function connected to the “onLoad”.
If I use “LoadVars” as a handler to load the file, it gives me the raw data, something like “%3Cp%3E%3Cimg%20src=%27biathlon%27%20vspace%3D%272%27…” (you get the idea)…
If I use an XML handler, it only gives me the first entry when I use “this” to send the file’s content to the htmlText-field… probably because each entry in the file is enclosed by “<p>”-tags and the XML-handler considers the file to be over once the first closing “</p>” occures?
What would need to be added to the file to make it load it all? Or what would I need to change about the function to make sure it sends the whole content of the file?
When I use “trace” on the “this” that is loaded, it actually does give back only what it also sends to the textfield, even though the text-file contains several rows of that stuff.
Your help is very appreciated.
Thanks!