How to clear the buffer without using .innerhtml := ""

how can I clear a html document without using this:
(webbrowser.document as IHTMLDocument2).body.innerhtml := "";
I tried this, but didn't do what I expected:
(webbrowser.document as IHTMLDocument2).clear;

Comments

  • : how can I clear a html document without using this:
    : (webbrowser.document as IHTMLDocument2).body.innerhtml := "";
    : I tried this, but didn't do what I expected:
    : (webbrowser.document as IHTMLDocument2).clear;
    :
    Try this:
    [code]
    WebBrowser.Navigate('about:blank');
    [/code]
    It should navigate to the internal blank page of IE.
  • : : how can I clear a html document without using this:
    : : (webbrowser.document as IHTMLDocument2).body.innerhtml := "";
    : : I tried this, but didn't do what I expected:
    : : (webbrowser.document as IHTMLDocument2).clear;
    : :
    : Try this:
    : [code]
    : WebBrowser.Navigate('about:blank');
    : [/code]
    : It should navigate to the internal blank page of IE.
    :
    it will blink the screen... and can't let it blink
    you know, I am building a telnet with webbrowser
    and as normal terminal, it will have a short buffer, like 500 lines... when the buffer reachs 500 lines, we take out the begining and paste the rest
    so I can't let it blink
    I am using (webbrowser.document as IHTMLDocument2).write to put things in the buffer, I just found this write procedure, and it do not lag my project, it only lags if I get a real super big buffer, and I don't want that big, so I would like to take out the begining of the text, so it won't get bigger...
    I can't use the .innerhtml := '' because if I use it, I can't use the ().write again, it gives me an error
    any sugestions plz

    thanks
    (sorry for my english :( )
  • : : : how can I clear a html document without using this:
    : : : (webbrowser.document as IHTMLDocument2).body.innerhtml := "";
    : : : I tried this, but didn't do what I expected:
    : : : (webbrowser.document as IHTMLDocument2).clear;
    : : :
    : : Try this:
    : : [code]
    : : WebBrowser.Navigate('about:blank');
    : : [/code]
    : : It should navigate to the internal blank page of IE.
    : :
    : it will blink the screen... and can't let it blink
    : you know, I am building a telnet with webbrowser
    : and as normal terminal, it will have a short buffer, like 500 lines... when the buffer reachs 500 lines, we take out the begining and paste the rest
    : so I can't let it blink
    : I am using (webbrowser.document as IHTMLDocument2).write to put things in the buffer, I just found this write procedure, and it do not lag my project, it only lags if I get a real super big buffer, and I don't want that big, so I would like to take out the begining of the text, so it won't get bigger...
    : I can't use the .innerhtml := '' because if I use it, I can't use the ().write again, it gives me an error
    : any sugestions plz
    :
    : thanks
    : (sorry for my english :( )
    :
    Here is a wild idea, which might work:
    - First create a normal HTML page filled with lines, where ## is a number
    - Then use the Document.Elements.innerHTML property to fill those (I'm not sure about the precise property names)
    - Once you reach the bottom of the page, move all line 1 to the top (for-do loop) and fill the bottom line with the new line

    This should give a sense of scrolling without making the page very long. I don't know how it will look blinking-wise, but its worth a shot.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion