change innerHTML while executing

P

Paolo matador

Hi everybody...

I hope someone will help me with this problem.

I've got a function, which must do thinks in 3 steps.
1. Change the innerHTML of an element to show a message (Please wait
while ...)
2. Work with datas
3. Re-Change the innerHTML to show the result.

The work on datas may take a few seconds (working with XML, DOM and so
on)

I did a cut and paste of an old post, but no one did any answer, so I
hope to give any help now.
Thanks.
 
J

James Black

Use setTimeout and do the next step when the timeout is called.

You can set the timeout to be something like 20ms, so it basically goes
directly to it, but, since it is a new function call the browser will
write what you did the first time.

I would have to find the message here where this was explained based on
a question of mine, actually.
 
V

VK

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top