hi,

I want to use loading gif while AjaxMethod is running. my simple
javascript code like this:
//js method
function BilgiGetir(x)
{
  document.getElementById("Content").style.display="none";
  document.getElementById("Loading").style.display="block";
  var res = _Default.GetData(x);
  document.getElementById("Content").innerHTML=res.value;
  document.getElementById("Content").style.display="block";
  document.getElementById("Loading").style.display="none";
}
///
ie does not response when _Default.GetData method called. So Loading
Gif could not be visible.it is becoming visible of course but just
after AjaxMethod done its job but we could not see loading image. I
tried to setTimeout to view loading but it is not exactly what i want.
I want, when ajaxmethod is processing on server loading layer become
visible until ajaxmethod finished its job then return value binding a
layer and then loading image become invisible. How can i solve this
problem? Thank you


//my AjaxMethod
    [AjaxPro.AjaxMethod]
    public string GetData(int x)
    {
        string a=string.Empty;
        try
        {
            FileStream fs = new
FileStream(Server.MapPath("../")+"\\"+paths[x], FileMode.Open,
FileAccess.Read);
            StreamReader sr = new StreamReader(fs);
            a = sr.ReadToEnd();
            sr.Close();
            fs.Close();
        }
        catch (Exception ex)
        {
            a = ex.Message;
        }
        return a;
    }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---

Reply via email to