SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot Goldilocks's Avatar
    Join Date
    Apr 2003
    Location
    Three Bear's Cottage
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search progress bar

    I have an ASP page on my intranet that searches a large database. After you click search it takes a while for the results to display so you just get a blank page and it looks like nothing is happening.

    What I want to do is, using javascript, display something that makes it obvious that it is actually doing something. This could be either a progress bar or an animated image that dispappears once the page is loaded.

    Does anyone know where I can find a script that will do this?

    Thanks.

  2. #2
    SitePoint Enthusiast kgish's Avatar
    Join Date
    Dec 2001
    Location
    Gouda, The Netherlands
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can best achieve this by setting a refresh to occur every few seconds or so using a timer routine.

    Code:
    timerID = setTimeout("window.location.reload(true)",1000);
    Or you can script in a redirect to occur using a meta-tag.

    Code:
    <meta http-equiv="refresh" content="5; url=http://www.yourdomain.com">
    Or script in a redirect in the onload within a body-tag.

    Code:
    <body onLoad="window.location='/newlocation.html'">
    So as you can see, there are a number of ways to do this trick as long as you are creative and/or a javascript freak (like me).
    Kiffin
    Your average future-famous kind of guy...


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
  •