Web Analytics Made Easy -
StatCounter displaying div before ajax javascript - CodingForum


No announcement yet.

displaying div before ajax javascript

  • Filter
  • Time
  • Show
Clear All
new posts

  • displaying div before ajax javascript

    I have to display a div before firing a sync ajax in javascript
    div is getting displayed in firefox but not in IE and chrome.

    I need to basically display a download bar to indicate the user that the request is in progress

  • #2
    Generally, if you want to make sure that information is being displayed before starting a sync action, you'll have to give the render engine time to do so. This can be achieved using setTimeout with a short delay.

    Something in the lines of
    window.setTimeout(startSyncAjax, 50);
    function startSyncAjax() {
       // perform the sync Ajax action here


    • #3
      thanks devnull69 ,
      I have tried this.. this is showing the progress bar but the download is getting blocked in IE (download information status bar is coming)
      Is there any other way of displaying progress bar during downloading when server processing is taking long time


      • #4
        No because you said the request is a synchronous one. A synchronous Ajax request will always block / freeze the browser until it is finished.