window.XmlHttpRequest doesn't exist in FireFox 2.0?

Discussion in 'Javascript' started by yawnmoth, Nov 9, 2006.

  1. yawnmoth

    yawnmoth Guest

    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?
    yawnmoth, Nov 9, 2006
    #1
    1. Advertising

  2. yawnmoth

    VK Guest

    window.XmlHttpRequest doesn't exist in FireFox 2?

    Noop... and never did in the previous versions. Try your luck with
    XMLHttpRequest (watch the case ;-)
    VK, Nov 9, 2006
    #2
    1. Advertising

  3. yawnmoth

    yawnmoth Guest

    VK wrote:
    > 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
    yawnmoth, Nov 9, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Y.S.
    Replies:
    3
    Views:
    1,004
    strajan
    Sep 17, 2003
  2. LT
    Replies:
    7
    Views:
    2,089
    Phlip
    Jul 25, 2004
  3. Markus Mohr
    Replies:
    7
    Views:
    243
    Thomas 'PointedEars' Lahn
    Nov 28, 2003
  4. David
    Replies:
    10
    Views:
    378
    Daniel Kabs
    May 4, 2005
  5. gobera

    XMLHttpRequest and Firefox Problem

    gobera, May 3, 2005, in forum: Javascript
    Replies:
    0
    Views:
    79
    gobera
    May 3, 2005
Loading...

Share This Page