2 Replies Latest reply on Jan 30, 2008 2:06 AM by FlexPrashant

    ajax reuest

    FlexPrashant
      Hello all . In the javascript we can check the server request status with the help of following code
      function CreateXmlHttpRequestObject()
      {
      var xmlObj;
      if (window.ActiveXObject)
      {
      try
      {
      xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e)
      {
      xmlObj = new ActiveXObject("Msxml2.XMLHTTP");
      }
      }
      else
      xmlObj = new XMLHttpRequest();

      return xmlObj;
      }
      function getavaluser()
      {
      var usr=document.getElementById("txtusername").value;
      var xmlHttp=CreateXmlHttpRequestObject();
      xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4 )
      {
      if(xmlHttp.status == 200)
      {
      if(xmlHttp.responseText == "1")
      {
      //alert("success");


      }else
      {
      //success(usr);

      //alert(xmlHttp.responseText);
      }
      }

      }
      }


      }


      in this way before xmlHttp.readyState==4 we can put a loading image on a image control


      I want to know that how can we do this same thing in flex