SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Dec 2005
    Posts
    964
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Animation while loading a php page?

    Is it possible to "ajaxlike" make a animation while loading an internal page... Is there a tutorial for this or example?

  2. #2
    SitePoint Zealot Cute Tink's Avatar
    Join Date
    Apr 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's a question for the Javascript section, but yes. I would think that you would start the animation when you call the page and terminate it when you get the response.

  3. #3
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's the general gist. At some point during the page display, output the animation. Then terminate it at the end of the page load. Make sure to ob_flush() and flush() if needed so the animation code goes to the browser.

    In in one of the browsers, it won't render the beginning of a table if it doesn't have the end of the table, so you can't put the animation in a table cell when the rest of the page has more table contents.

    I've generally found it's better to put the animation on internal links that you know are going to take a while. Add some onclick code to the links that popup a please wait dialog, and once the next page finishes processing the animation goes away.


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
  •