Results 1 to 3 of 3

Thread: progress bar animation (processing.gif) in sync and async mode

  1. #1
    Join Date
    Jan 2007
    Location
    Chennai, Tamil Nadu, India
    Posts
    31
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default progress bar animation (processing.gif) in sync and async mode

    Hi,

    I use both sync and async modes.
    Before starting any ajax request i display a processing(rotating) gif icon to show that the request is in progress.
    when i get the response i will hide the animating gif to show that the process has completed.
    this works fine with async and sync mode of ajax in FF but not in IE.

    If i use sync mode. that is AJAX.open('GET','path.php',false); in IE the gif file is not visible
    because IE is not displaying it. Basically this is also correct because that is the way sync is meant to.
    If it is sync mode then no other process will take place until the browser gets the response.
    Were as in async mode the request is threaded so other processes are not affected.

    But FF displays the animated gif for both the modes of ajax. and IE displays the animated gif only for async request.
    If anybody know the reason behind then please post your replies. 'cause i have simplified most of my projects by using sync mode of ajax.
    But in IE the progress (processing) animation is not visible so the user will not know what is happening till the browser gets the response.

    So, i hope that i have to stick with async mode. in sync mode you can write code in a few lines and it is very easy to have various type of functions which could return bool, array, object etc... since you get the result in the LHS... but that is not the case in async mode... we need to do a lot of gimmick to have a prototype of ajax...

    also if i could have references to sites which explains ajax in complete detail then i will update my idea of ajax.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The simple answer is that Firefox is doing it wrong.

    You really should use async. That can be simplified with a function that handles all of that for you, like possibly:

    http://www.dynamicdrive.com/forums/s...3&postcount=23

    I have a more robust version where you may customize the callback (the onreadystatechange function). If you are interested in it, let me know.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2007
    Location
    Chennai, Tamil Nadu, India
    Posts
    31
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default yes

    yeah, i understand... i am changing my sync wrappers to async.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •