Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 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
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,355
    Thanks
    11
    Thanked 558 Times in 551 Posts
    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
    Code:
    window.setTimeout(startSyncAjax, 50);
    
    function startSyncAjax() {
       // perform the sync Ajax action here
    }

  • #3
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,355
    Thanks
    11
    Thanked 558 Times in 551 Posts
    No because you said the request is a synchronous one. A synchronous Ajax request will always block / freeze the browser until it is finished.


  •  

    Posting Permissions

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