Fun with Ajax and XmlHttpRequest

September 10, 2007

Earlier tonight I had a weird bug with some homegrown Ajax code. Specifically, I had the following lines: ...which was working fine on Firefox 2.0.0.3, but was not working on Firefix 1.5.x, nor on a Firefox 2.0.0.5 machine (which was REALLY screwy considering how subtle the version number change was on that machine). We were getting an error stating: "not enough arguments" on this line: I don't really consider myself an Ajax guru (which is probably obvious), so I began my usual routine of setting some debug messages and looking at the code. From what I can gather either a) it was gremlins or b) some flavors of Firefox are just pickier about how HmlHttpRequest is used. After tightening up my syntax for passing "null" to send(), and flipping the "asynchronously" flag to "true", things began working just fine: Sometimes it's the damndest tiny things. :)