hello everybody,




this is my first post. hopefully i can get an answer to this question because it's been bugging me for weeks. i hava a script it's an ajax script. what i want to do is run a function while the ajax is retrieving my page. sounds simply enough but this is a script i downloaded and i'm trying to modify it to do what i need. here is the code that i need to change
[CODE]
function ajax_loadContent(divId,url)
{
if(enableCache && jsCache[url]){
document.getElementById(divId).innerHTML = jsCache[url];
return;
}

var ajaxIndex = dynamicContent_ajaxObjects.length;
document.getElementById(divId).innerHTML = '<script type=\"text/javascript\" language=\"javascript\">setTimeout(\'show_progress\', 1000)</script>';
dynamicContent_ajaxObjects[ajaxIndex] = new sack();
dynamicContent_ajaxObjects[ajaxIndex].requestFile = url; // Specifying which file to get
dynamicContent_ajaxObjects[ajaxIndex].onCompletion = function(){ ajax_showContent(divId,ajaxIndex,url); }; // Specify function that will be executed after file has been found
dynamicContent_ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function


}
[CODE]
here is an example of it live.

http://www.dhtmlgoodies.com/scripts/modal-message/demo-modal-message.html



what i want to do is in document.getElementById(divId).innerHTML i want to print a settimeout function that will simply call a function. this function will then populate the innerHTML with what i need. the problem i am having is getting the function to run. the innerHTML is <script type="text/javascript" language="javascript">setTimeout('show_progress', 1000)</script> but the show_progress script won't run. it just prints that out. does anyone know how i can get the show_progress function to run? any assistance will be greatly appreciated. let me know if i need to post more code


thank you in advance for your help.


http://dynamicdrive.com/dynamicindex17/featuredcontentslider.htm