Problem with xmlhttp and mozilla

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jw56578@gmail.com

    #1

    Problem with xmlhttp and mozilla

    I request a response with xmlhttp. I'm testing it on mozilla and
    explorer. mozilla returns "undefined" unless i "alert" the value of the
    response first.
    explorer works fine. what is the problem.

  • commercial

    #2
    Re: Problem with xmlhttp and mozilla

    "xmlhttp" is the ms way to define or start an xml component.

    Unless you have ever seen the 'mozilla' way of requesting
    or never posted it verbatim, there is little change in hell to
    get an affirmative anwser.

    In other words : you can not use the same WORD to
    have it on either browser the SAME way.



    <jw56578@gmail. com> wrote in message
    news:1119245747 .732217.81550@g 14g2000cwa.goog legroups.com...[color=blue]
    > I request a response with xmlhttp. I'm testing it on mozilla and
    > explorer. mozilla returns "undefined" unless i "alert" the value of the
    > response first.
    > explorer works fine. what is the problem.
    >[/color]

    Comment

    • Daniel Kirsch

      #3
      Re: Problem with xmlhttp and mozilla

      jw56578@gmail.c om wrote:[color=blue]
      > I request a response with xmlhttp. I'm testing it on mozilla and
      > explorer. mozilla returns "undefined" unless i "alert" the value of the
      > response first.
      > explorer works fine. what is the problem.[/color]

      Probably your document gets loaded asynchronously and isn't fully loaded
      when you requesting it. To get a synchonous load send a third parameter
      (false) for your open command:


      var httpRequest = new XMLHttpRequest( );
      var doc=null;
      if (httpRequest) {
      httpRequest.ope n('GET', file, false);
      httpRequest.sen d(null);
      doc = httpRequest.res ponseXML;
      }
      return doc;

      see


      Daniel

      Comment

      Working...