• NPower_Evan
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hello,
I have written some S-control scripts using AJAX toolkit, and some of them take some time to complete. It would be nice to show some text while parts of the scripts are running so that the user has some feedback on what's happening.
Currently, the S-control appears in a popup window and is blank until the whole script is finished. My code is as follows:
Code:
function initPage() { 
document.getElementById('divErrorMsg').innerHTML = "starting...";

//Get Salesforce connection based on users current session id 
sforceClient.registerInitCallback(setupPage);
sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_70}", true);
then setupPage function executes...and finally the HTML appears:
Code:
<body onload="initPage();"> 
<center> 
<DIV id="divErrorMsg"></DIV> 
</center> 
</body> 
</html>
Is there any way I can update the div element during the execution of the script?
Many thanks.