HTML with tags

Hello,

I have a big html field with scrollbars.
The content of the html field can be refreshed by a method.
With this method I would like to show a specific line of the html content.

Is this possible? Any ideas on that?

Thomas

The only idea I get is to use the http plugin and load a tmp html file generated on the fly, using anchors inside the file like this:

myGlobal = plugins.http.getPageData('file:///tmp/my_html.html#index2');

Hope it can help you.

Depending on what you mean by ‘specific line’ you may find the getScrollY(), getScrollX(), and setScroll() methods on Text Area fields with scroll bars useful.

I also have a large html block that gets reloaded frequently, but I don’t want to lose the current focus. Before I set the field, I call

var yPos = elemets.fldHTML.getScrollY();
var xPos = elements.fldHTML.getScrollX();

then after setting the HTML I run:

elements.fldHTML.setScroll(xPos, yPos);

and (by and large) this gets me back to where I was.