Possible bug in firefox? (AJAX related)

Soldato
Joined
20 Oct 2002
Posts
3,469
Location
London, UK
Hey all,

I've been banging my head against a brick wall on this one for the last 12 hours, and the time has come for me to give up and consult the gurus on this one.

The below URL contains a login page, you can test it using the details
User: marco
Pass: polo

This seems to work PERFECTLY in opera, and it works in firefox but ONLY if I have firebug enabled. I don't care about IE for now, I'll sort that out later.

URL: http://www.doc.ic.ac.uk/project/2006/271/g0627142/test/index.htm

The problem lies in the fact that despite the ajax readyState variable evidently changing (as you can see in the debug alert popups), it never executes the code defined by onreadystatechange.

If you view in Opera, you'll be able to see that an alert box pops up each time the onreadystatechange is triggered.

Can anybody help me? I've consulted google many times and this particular problem doesn't seem to be discussed anywhere.
 
Last edited:
Thanks for the replies so far chaps :)

psyr33n said:
Code:
ajaxRequest.open("POST", desturl, false);
Try making the request asynchronous (third param to true) so the script doesn't wait for a reply from the server. Firebug has done stuff like this to me in past versions and needed its options changed.
yeah I have tried that but it doesn't seem to change the fact that onreadystatechange doesnt trigger.

I was thinking perhaps the problem might be because the request is sent using a POST method rather than GET, but I want it to be POST :(

I have now got it working perfectly in IE too, turns out the only thing wrong with it as far as IE was concerned was because I was using some "const" declarations instead of "var" to define some constants, which IE apparently doesn't like.

In its current state, it works perfectly with:
Firefox (only with firebug addon running)
IE
Opera

I haven't tested other browsers, but IE and 2 different mozilla's is a good start I reckon :)
 
Back
Top Bottom