Connecting Tech Pros Worldwide Help | Site Map

message

  #1  
Old December 5th, 2005, 10:45 PM
mike
Guest
 
Posts: n/a
I have a page that generates content in a <tbody></tbody> dynamically.

The thing is if there is about 167 or so records it takes some time to
render them so I put a tag like:

<div id="str_status"> </div>

and in my js I have

function blah()
{
document.getElementById("srt_status").innerHTML = "rendering";
..
..
..some code here that takes a bit of time
..
..
document.getElementById("srt_status").innerHTML = "";
}

Problem is I never see the "rendering" ..... Looks like it renders all
at once and is not updating as the steps occur.

Any thoughts?

Mike

  #2  
Old December 5th, 2005, 11:05 PM
Ivo
Guest
 
Posts: n/a

re: message


"mike" wrote[color=blue]
> I have a page that generates content in a <tbody></tbody> dynamically.
> The thing is if there is about 167 or so records it takes some time to
> render them so (...) in my js I have
>
> function blah()
> {
> document.getElementById("srt_status").innerHTML = "rendering";
> .
> .some code here that takes a bit of time
> .
> document.getElementById("srt_status").innerHTML = "";
> }
>
> Problem is I never see the "rendering" ..... Looks like it renders all
> at once and is not updating as the steps occur.[/color]

That 's right. And in the main we 're only glad that no time in between is
wasted on useless redrawings. To tell the machine that you 're looking for
such intermediate update, you could employ a setTimeout:

function blah()
{
document.getElementById("srt_status").innerHTML = "rendering";
window.setTimeout( 'proceed();', 10 );
}

function proceed()
{
..
..some code here that takes a bit of time
..
document.getElementById("srt_status").innerHTML = "";
}

The minimum amount of waiting time (10 ms. in the code above) needed for the
effect to succeed, varies from machine to machine. I have found that a
Timeout of 1 ms is too short in some situations, but 50 or 100 is much more
than enough.
hth
ivo
http://4umi.com/



  #3  
Old December 6th, 2005, 06:15 AM
Danny
Guest
 
Posts: n/a

re: message



Roughly knowing little of what you have, I'd say is some runtime
issue, some process might be overriding the "rendering" part or
conflicting it, OR is just your timing doesn't allow for a screen
painting of the text long enough to be viewable.



Danny
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
design problem - message translator forums_mp@hotmail.com answers 2 October 12th, 2008 10:55 AM
Problem with message queues / msgrcv bernd answers 2 June 27th, 2008 08:38 PM
Problem with parsing email message with extraneous MIME information Steven Allport answers 3 January 2nd, 2008 09:15 AM
Error sending SMTP MAil message in c# =?Utf-8?B?QWRl?= answers 2 July 2nd, 2007 02:15 PM
Error in WCF IEndpoingBehavior when creating a new Message. ronscottlangham@yahoo.com answers 0 June 12th, 2007 03:25 PM