3 Replies Latest reply on Aug 5, 2007 7:47 PM by romain_shift

    xml.send() works but not sendAndLoad()

    romain_shift
      Hi guys, i'm trying to send data to a servlet ( which is hosted on a different server and managed by a 3rd party so i can't change it)

      When I use the following code:

      requestXML.send (" http://www.mydomain.com/xmlpost", "_blank","POST");

      it opens a new browser window which displays the xml response. All good.

      But I don't want a new broswer window. I want the flash to wait and see what the response is. So I use:

      requestXML.sendAndLoad (" http://www.mydomain.com/xmlpost", myLoginReply_xml,"POST");
      var myLoginReply_xml : XML = new XML ();
      myLoginReply_xml.contentType = "text/xml";
      myLoginReply_xml.ignoreWhite = true;
      myLoginReply_xml.onLoad = myOnLoad;
      function myOnLoad(success:Boolean) {
      if (success)
      {
      getURL ("javascript:alert('" + myLoginReply_xml + "')")

      } else
      {
      getURL ("javascript:alert('FAIL!')")
      }
      }


      And nothing happens.
      Is there any difference between send and sendAndLoad why it wouldn't work? Different security parameters, different dtat format, anything?

      Thanks!