I can't say for sure what the problem is, as I never use XMLHttpRequest directly. Have you considered using a library like jQuery or prototype? They make DOM manipulation and AJAX queries much simpler.