XmlHttp with mozilla?

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

    XmlHttp with mozilla?

    anyone have a code example of using xmlhttp with mozilla, if i use the
    following code, the function is never called, but it does work in IE.

    xmlhttp.onready statechange = function()
    {

    if (xmlhttp.readyS tate == 4)
    {
    var response = xmlhttp.respons eText;
    divResponse.inn erHTML += "<p>" + response + "</p>";
    }
    }

  • horndude77@gmail.com

    #2
    Re: XmlHttp with mozilla?

    I'm not totally sure about this but all the code that I've read has an
    extra '&& xmlhttp.status= =200' in the conditional. Now that shouldn't
    change anything though; it should still work. All code that I've
    written like this has worked fine in firefox and looks quite similar.
    Check the javascript console for errors. The only thing that I can
    think of is that the error is elsewhere. Perhaps when xmlhttp was
    created (different than IE). Adding some more code here would also
    help. Good luck.

    -----Horndude77

    Comment

    • Martin Honnen

      #3
      Re: XmlHttp with mozilla?



      jw56578@gmail.c om wrote:
      [color=blue]
      > anyone have a code example of using xmlhttp with mozilla, if i use the
      > following code, the function is never called, but it does work in IE.
      >
      > xmlhttp.onready statechange = function()
      > {
      >
      > if (xmlhttp.readyS tate == 4)
      > {
      > var response = xmlhttp.respons eText;
      > divResponse.inn erHTML += "<p>" + response + "</p>";
      > }
      > }[/color]

      I don't see anything wrong with that code snippet therefore I think the
      problem is elsewhere. Make sure that you do
      xmlhttp.send(nu ll)
      if you don't want to send anything in the request body, with IE you can do
      xmhttp.send()
      but Mozilla wants the null argument.


      --

      Martin Honnen

      Comment

      • jw56578@gmail.com

        #4
        Re: XmlHttp with mozilla?

        I determined that the problem was because i was calling xmhttp.Send(),
        with a capital "S". For some reason this works in IE, but not in
        firefox. send() with a lower case "s" is proper.

        Comment

        Working...