locked
Loading Effect like google using ajax RRS feed

  • Question

  • User1983487377 posted

    Hello,

     

    I want to develop functionality like  Google that of loading

    on every postback until the whole page is loaded, i want to display a .gif indicating "loading.." 

    i tried a lot on google but  all answer were with thread that i dont want.

    i want to display the image until the page is loaded..

    Thanx in advance

    ~Bhaarat [:D]

    Tuesday, June 24, 2008 3:04 AM

Answers

  • User2022958948 posted

    Hi,

    Display Page Loading during the first time Page load (not post back) is defferent from Loading during the event postback.

    Because, when event postback, the client content is exist and we can use JavaScript add a loading div layer and use AJAX update the related block. But during the Page Load, the client content is not exiest, you have to request a page content to display.

    So we have to simulate a client to display a loading info and do request to retrieve the page content.

    In this way, you have to create another page and use JavaScript to display a div layer to display Page Loading, then use HTTPRequest to retrieve the page content all into the page content layer in the current page. Finally, hide the loading div layer and display the page content layer.

    Another approach is setting backgroud as the loading image. After loading, clear the loading image. You can get more in here: http://www.daniweb.com/forums/thread40032.html

    Or you can create a new page, and use IFrame to link the real page. At first, display the loading div. After the real page in IFrame loading, use JavaScript to hide the loading div.

    You can popup Loading div at postback, but I don't think that I should suggest you do that during the first time Page Load.

    Hope it helps.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 26, 2008 3:37 AM

All replies

  • User1710623990 posted

     Use Ajax for .Net.. which has a very simple way to implement the way you are looking for.

    Take the help of "UpdateProgress" in Ajax for .Net

    Hope that helps [Yes] 

     

    Tuesday, June 24, 2008 3:37 AM
  • User1983487377 posted

     Thanx for Reply

    But can u tell how

    i know using triggers we can handle the event postback

    but how to do it with page_load ?

     

     

    Tuesday, June 24, 2008 6:29 AM
  • User2022958948 posted

    Hi,

    Display Page Loading during the first time Page load (not post back) is defferent from Loading during the event postback.

    Because, when event postback, the client content is exist and we can use JavaScript add a loading div layer and use AJAX update the related block. But during the Page Load, the client content is not exiest, you have to request a page content to display.

    So we have to simulate a client to display a loading info and do request to retrieve the page content.

    In this way, you have to create another page and use JavaScript to display a div layer to display Page Loading, then use HTTPRequest to retrieve the page content all into the page content layer in the current page. Finally, hide the loading div layer and display the page content layer.

    Another approach is setting backgroud as the loading image. After loading, clear the loading image. You can get more in here: http://www.daniweb.com/forums/thread40032.html

    Or you can create a new page, and use IFrame to link the real page. At first, display the loading div. After the real page in IFrame loading, use JavaScript to hide the loading div.

    You can popup Loading div at postback, but I don't think that I should suggest you do that during the first time Page Load.

    Hope it helps.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 26, 2008 3:37 AM