Link to home
Start Free TrialLog in
Avatar of jeffypop
jeffypop

asked on

DoEvents in VBScript?

I am running through a client side loop on an asp page. During each pass in this loop, I want to change the innerText of a div on the page. Trouble is, the text in the div never changes until the sub is complete, and the div text is whatever the loop last set it to. I know DoEvents is not included in VBScript, but that's the functionality I need. Does anyone know of something that achieves what DoEvents achieves? How can I get the page to display the changes I make while the sub is still executing?
ASKER CERTIFIED SOLUTION
Avatar of Göran Andersson
Göran Andersson
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of giladBoker
giladBoker

u can use the client side for it to.

if u use javascript like that.

<script language=javascript>
var numOfLayer=0;
function ChangeDiv(){
  numOfLayer++;
  window.divName.innerText or innerHTML=numOfLayer

  setTimeOut('ChangeDiv()',500);//this reloads the function again every 500 mili seconds


if(numOfLayer==10){
   clearTimeOut();//stopps the automatic calling
   numOfLayer
}
}
</script>
Sorry my answer is like greenGhost but just in javascript
No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.

In the absence of responses, I will recommend the following:

To accept the comment and points awarded to GreenGhost

** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **


Just trying to help for the cleanup...
gladxml