Results 1 to 10 of 10

Thread: Loading....

  1. #1

    Thread Starter
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629

    Loading....

    Hi all,
    my first attempt on making an ASP

    I'v made a page that fetches data from an access database, this takes some time, and I was wondering if there is a simple way to show to the user that a process is ongoing...

    something like this :



    or just show "Loading..." would be enough...

    thanks
    -= a peet post =-

  2. #2
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    the script from the screenshot you posted there is simple, it isnt being displayed while the data is being entered, it works something like this:

    HTML page where user fills in data >>> ASP page that adds the data to the database >>> HTML page that shows "thanx for posting, will be redirected to your post in 3 seconbds", it is only to display to the user that the post has been aded, and then redirects itself.

    is that clearer now ?? anyway, if you wanted a progress bar to show how far the process is, forstly it would have to bo done with a client side script which ASP is not, and secondly i dont think it is possible. (I may be wrong though )

    hope i was of some assistance.

  3. #3
    Addicted Member
    Join Date
    Nov 2001
    Location
    Liverpool, England
    Posts
    155
    You could do it with javascript and layers. It won't be a true progress bar as such but will overlay the results page with a layer, until the underlying page has finished.

    Here's some code that may be of use (not my own, it's from some source code website). It's not the best result I've ever seen but should give you something to mess about with. And if you search javascript sites yu may find a better one (there are some animated "progress bars" knocking around as well).

    In <head> part:
    Code:
    <SCRIPT LANGUAGE="JavaScript">
    function PleaseWait() 
    {
      if (document.getElementById) {  // DOM3 = IE5, NS6
        document.getElementById('hidepage').style.visibility = 'hidden';
      }
      else {
        if (document.layers) {  // Netscape 4
          document.hidepage.visibility = 'hidden';
      else {  // IE 4
        document.all.hidepage.style.visibility = 'hidden';
        }
      }
    }
    </script>
    In the <body>
    Code:
    <BODY OnLoad="PleaseWait()">
    
    <div id="hidepage" style="position: absolute; left:10px; top:10px;
     background-color: #FFFFCC; layer-background-color: 
    #FFFFCC; height: 100%; width: 100%;"> 
    
    <center><p valign="middle">Please wait while page loads...</p></center></div>
    Hope that's of some use.

  4. #4

    Thread Starter
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    thanks for the replies people !

    sweevo, that was just what I wanted ! thanks !

    I'm a happy man
    -= a peet post =-

  5. #5
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by ubunreal69
    anyway, if you wanted a progress bar to show how far the process is, forstly it would have to bo done with a client side script which ASP is not, and secondly i dont think it is possible. (I may be wrong though )
    Actually it is very possible . You can do a true progress bar[showing actual progress] using asp, i have seen it in various web sites, but never actually used it. If any one really really wants it then i will dig it up.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  6. #6

    Thread Starter
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    *sqwiaojifunelnkr* <-- peet getting spade for Danial !

    go do some digging man!

    -= a peet post =-

  7. #7
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by peet
    *sqwiaojifunelnkr* <-- peet getting spade for Danial !

    go do some digging man!

    Thanks peet, the spade came handy. Had to dig up a lot

    Here it is, i downloaded it from somewhere, cant remember. Its a scripts for searching and has a simple progress bar to show the progress of searching.

    Hope it is useful.

    Danial
    Attached Files Attached Files
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  8. #8
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    Originally posted by Danial


    Actually it is very possible . You can do a true progress bar[showing actual progress] using asp, i have seen it in various web sites, but never actually used it. If any one really really wants it then i will dig it up.

    Danial
    can ASP be run client-side or something?? am i totally on the wrong track or what ??

  9. #9
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by ubunreal69
    can ASP be run client-side or something?? am i totally on the wrong track or what ??
    No asp cant be run on client side, its a server side technology. Have a look the code i posted you will get some idea.

    The progressbar works something like this, first time it calls the search function, and then on if you call that same file again. instead of intiating the search sequence again, it gets the progress stage of the ongoing search event and constructs the progressbar and sends back to the client. I have only gone through the code briefly but thats my understing.

    Hope it clears out your question.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  10. #10
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    hmm, thanx danial

    it works (the script, duh) but i dont like it refreshing so much, i know thats how it works but it is a pain in the ass

Posting Permissions

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



Click Here to Expand Forum to Full Width