Rendering of DHTML elements programmatically in a loop

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: manju (manju_at_discussions.microsoft.com)
Date: 12/07/04


Date: Mon, 6 Dec 2004 19:29:02 -0800

Hi,
I use DHTML browser as my main application window and I create elements like
<p>, <table>, <img> etc dynamically using MSHTML C++ interfaces like

IHTMLDocument2::createElement
IHTMLDOMNode::insertBefore
and these elements appear in the browser after creation and insertion into
the DOM.

The problem is that if I create an element, say a <p> with some text, in a
loop like the following statement

for(100 times)
{
   createElement(...) //create <p> element
   insertBefore //appends as a child to its parent DOM node
}

The <p> elements dont appear until the loop terminates and once the loop
terminates all elements appear at once, until then the browser is blank.

Is it possible to let the HTML renderer display elements immediately after
creation and insertion into DOM node?
what I mean to say is that in the above loop which iterates 100 times every
time an element is created it must be immediately displayed, is there a way???

Thanks,
manju



Relevant Pages

  • Rendering elements in DHTML browser when created programmatically
    ... I use DHTML browser as my main application window and I create elements like ... The elements dont appear until the loop terminates and once the loop ... creation and insertion into DOM node? ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Awesome Tutorials for JavaScript beginners
    ... If the statement is false we exit from the while loop. ... Most Web developers think browser scripting is ... var UA = navigator.userAgent.toLowerCase; ... I suppose they could contact the authors of the script ...
    (comp.lang.javascript)
  • Re: A way to control the code flow of an asp.net while its running
    ... on the server, ... in the Browser, you get a blank window, because the page loading would ... The loop continues. ... will never be able to cancel it, no matter what kind of cancelling logic you ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Please help with the code
    ... multiple browsers in an array to navigate and loop 10 times to a website. ... If I start one browser (command1), ... I believe the problem is the Wait sub. ...
    (microsoft.public.vb.general.discussion)
  • Re: posting to a form with no form name
    ... from mechanize import Browser ... I have a different for loop im tryin to implement outside of that one, ... print 'password incorrect =', line.strip ...
    (comp.lang.python)