[Javascript] AJAX "waiting"?!
Michael Borchers
list at tridemail.de
Wed Aug 30 07:16:59 CDT 2006
the following functions work well. they call a php script via AJAX which
returns text.
the text is parsed into an confirm.
when i try to directely acces the php file while the confirm remains opened,
it seems to hang up loading. is this because the first httpRequest hasn't
closed yet
and only closes when the confirm is done?!
function getTasksReminders()
{
httpRequest.open('get', 'ajax.php?ajax_filename=check_tasks.php', true);
httpRequest.onreadystatechange = function() { remindTasks() };
httpRequest.send(null);
}
function remindTasks()
{
if(httpRequest.readyState == 4)
{
if(httpRequest.responseText != '')
{
confirmTasks = confirm(httpRequest.responseText);
}
if(confirmTasks == true)
{
document.location.href = 'tasks.php?select=1&search[users_id]=1>';
}
}
}
More information about the Javascript
mailing list