[thelist] AJAX Calls Working Intermittently in IE
Ben Dyer
radicalbender at gmail.com
Wed Mar 12 10:48:28 CDT 2008
On Wed, Mar 12, 2008 at 10:39 AM, misterhaan <misterhaan at track7.org> wrote:
> Lee Kowalkowski wrote:
> > On 12/03/2008, Ben Dyer <radicalbender at gmail.com> wrote:
> >
> >> req.send(null);
> >> req.onreadystatechange = function() {
> >>
> >
> > I'm not certain this is the reason, but I'd set up the
> > onreadystatechange event handler before calling send().
> >
> >
> I *am* certain that's the reason as I've run into this problem. Calling
> send() actually starts the request, and it might finish before
> onreadystatechange is set up.
Yes! That's it! I moved req.send() after req.onreadystatechange =
... and it works perfectly each time!
Thank you! The Internet saves my bacon again!
--Ben
--
Radical Bender
http://www.radicalbender.com/
More information about the thelist
mailing list