hi,

what I want to do is this: when the page is loaded, I'm calling some JS function, who is using prototype class, and make an ajax request, to some php file, in that file..I'm updating some stuffs in the database. This is taking some time..there is alot of records, so..what I'm trying to do..is showing in Real time, each record..that was updated. so I've made a second function. The problem is that, he is finishing the execution of the first file..and after that his displaying each record updated..and the DONE text. I need him to do this in the same time.

If anyone can help me please, I've tried many thinks..and couldn't make it.

I'm sending the functions I'm using..to make an idea :


Code:
	function UpdateAgenda(state,county)
	{
		if (county!="" && state!="")
		{
			var url="my_file.php";
			url=url+"?state="+state;
			url=url+"&county="+county;
			var target = 'agenda_results';
			$('loading').show();
			$('go_back').hide();
			var myAjax = new Ajax.Updater(target,url, { asynchronous: false, evalScripts: true, method: 'get',
											onSuccess:
											function(){
											document.getElementById('loading').style.display='none';
											$('go_back').show();
$('agenda_results').show();											}});
		
		}
		else
		{
			alert("Please choose a county and state to update !");
		}
	}

	function ShowUploadStatus(state,county)
	{
		if (county!="" && state!="")
		{
			// here we try to display the status...each city in Real Time !!!
			var url2="show_status_file.php";
			url2=url2+"?state="+state;
			url2=url2+"&county="+county;
			var target2 = 'show_status';
			var myAjax2 = new Ajax.PeriodicalUpdater(target2, url2, { method: 'get',
onSuccess: function(){$('show_status').show(); }, frequency: 2, decay: 1});
		}
	}
and when the page is loaded, I'm using both functions something like this:

Code:
onLoad="UpdateAgenda(state,county);ShowUploadStatus(state,county)"
If someone can give me some idea...pls I've run out of ideas.