Web Hosting Talk







View Full Version : AJAX..dynamically updating twice in a page


woutersteven
10-06-2006, 09:34 AM
I have the following question. I have an AJAX implementation and am trying to
update my page dynamically.

function myUpdate()
{
InsertDataInDiv('get1.asp','ajax2');
InsertDataInDiv('get2.asp','ajax');
}

The InsertDateInDiv function inserts the output of the first parameter in the
named div (2nd parameter).

this works fine if i put an alert() in between the function calls. But only the 2nd
is executed without the alert() call. I'm guessing the first function isn't finished
yet. How do you normally solve this?

woutersteven
10-06-2006, 09:56 AM
Found the solution already :).. problem was the scope of the http_request variabele. Removed everything from being global now and its working like a charm.