window.XmlHttpRequest doesn't exist in FireFox 2.0?

Y

yawnmoth

Say I have the following script:

<script>
var xmlHttp = false;

// http://blogs.msdn.com/ie/archive/2006/01/23/516393.aspx
if (window.XmlHttpRequest) {
alert("part 1");
xmlHttp = new XmlHttpRequest();
} else if (window.ActiveXObject) {
alert("part 2");
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}

if (xmlHttp)
alert("this far!!!!");
</script>

When running it, I don't get any alert windows. Shouldn't I be getting
two?
 
V

VK

window.XmlHttpRequest doesn't exist in FireFox 2?

Noop... and never did in the previous versions. Try your luck with
XMLHttpRequest (watch the case ;-)
 
Y

yawnmoth

VK said:
window.XmlHttpRequest doesn't exist in FireFox 2?

Noop... and never did in the previous versions. Try your luck with
XMLHttpRequest (watch the case ;-)

Good catch - thanks! :D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top