You're right; it's not Google AJAX APIs-related, but we're not as anal  
as some of the other Google APIs groups :)

Without seeing your page and/or code, it's tough to say what's going  
on, but I would guess that you're not checking the readyState before  
alerting the status.  Namely, the status will be 200 because the  
request doesn't know any better.  What you need to do is check that  
xhr.readyState==4&&xhr.status==200 before you do anything else in your  
onreadystatechange listener.  Otherwise, readyState will change a  
number of times before the request is actually completed, and you'll  
see your alert each time (assuming you can click fast enough).

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On Feb 26, 2009, at 6:17 PM, theinternot wrote:

>
> Hi All,
>
> I am having a hard time with a more general Ajax topic and was hoping
> some of you folks might be able to help me out.
>
> My question is this:
>
> Is it possible to send an ajax request to make an http request and
> not
> receive a response until the page has completely finished processing?
>
> I am trying to setup a dashboard to kick off data refreshes for
> cached
> data in various Intranet applications.
>
> They can all be run via URL's... what I want to happen is click a
> button, show the user a
> message while the http request is running and then show a response
> once the page is finished processing.
>
> Normally, this process can take upwards of 30 seconds to a minute...
> but for some reason when I run this via an ajax request it comes back
> almost instantaneously.
>
> I just seem to be getting back the status (200).
>
> Any thoughts on this would be extremely appreciated.
>
> Thanks,
>
> John
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to