Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 11th, 2003, 11:57 PM
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default "please wait" ASP page

I have several scripts that can take minutes to run and they occasionally time out. I would like to display a "please wait" page that displays a message to the requester while another script runs. I have an example that appears to be an intermediate page, but some of my scripts require several parameters to be passed to them and I'm not sure how to pass the required parameters from one page through the "please wait" page to the target script. Any examples or pointers would be greatly appreciated.

-Tyge

Reply With Quote
  #2 (permalink)  
Old December 12th, 2003, 03:00 AM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Take a look at this page: http://www.eggheadcafe.com/articles/20010610.asp

This article describes a technique of displaying a progress bar without an intermediate page. All it does is output the "progress bar" at the top of the page, and then starts the server side processing. As soon as the page is finished, the bar is hidden.

Search Google for ASP and Progress Bar and you'll find plenty of other solutions including ASP components.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old December 12th, 2003, 09:16 AM
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Imar, I truly appreciate your assistance! I'm well on my way to solving my issue now!

-Tyge

Reply With Quote
  #4 (permalink)  
Old December 12th, 2003, 10:04 AM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Cool. Would you mind sharing it with this forum when it's done? May help someone else in the future....


Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #5 (permalink)  
Old December 12th, 2003, 10:45 AM
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I will post some sample code and explanation as soon I get it working completely, thanks for your help!

-Tyge

Reply With Quote
  #6 (permalink)  
Old December 12th, 2003, 11:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I actually implemented it based on the link so I could share it as working code here, however it will not work when I upload it to my ISP! It work on localhost!

:(

Jacob.
Reply With Quote
  #7 (permalink)  
Old December 12th, 2003, 11:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perhaps I need to say that when I do simple cut&paste from the link Imar posted, it do not work either at my ISP.

Jacob.
Reply With Quote
  #8 (permalink)  
Old December 12th, 2003, 01:39 PM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Can you define "does not work"? I copied and pasted this example as well, and it didn't run correctly the first time. Then I changed the loop count from 200 to 2000 and it worked. Apparently, the page runs too fast for the progress bar to be seen (Jeff, if you're reading this: it's the machine with the pico second performance.... ;) )

Now, with the loopcount to 2000 I do see a progress bar.

Did you copy the entire code block? The Response.Buffer is crucial here. Without that statement, the example won't work on most IIS installations (as of IIS 5 buffering is on by default, so the entire page output will be buffered before it gets send to the browser, causing this example to fail).

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #9 (permalink)  
Old December 12th, 2003, 06:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Allright! It must be something at the server, and it is not due to the loop count. I changed mine too. I have got no problem at my own machine, however when uploading the page it doesn't work. Actually, it hangs for longer than it should according to what I have seen on my own machine (not a bandwidth problem).

Yes, I have got the Response.Buffer = False, and I actually tested it, by including an alert statement before all the updating takes place, and when running this at my ISP it actually do execute the alert, but then it hangs!

Regarding the cut&paste, I did it directly from the link, which was no good. It is obviously not the code which is wrong, since you are able to make it work, so it must be the provider. But what is the problem here then!?!

It is not crucial to me so do not use too much of your time on this :) !

Jacob.
Reply With Quote
  #10 (permalink)  
Old December 13th, 2003, 06:07 AM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I tested the link you posted and it *is* weird. When you look at the source of the page in the middle of the loop count, the JavaScript alert is there *and* the JavaScript for the progress bar is there. So, I'd say that when the code is there at the client, it should execute and increase the progress bar (unless requesting the source does something else than just requesting the internal, downloaded source).

I also checked whether it would make a difference if the code for the progress bar was placed before, in or after the <body> and / or <html> tags, but nothing seems to change.

One more thing you could try: Use Response.Buffer = True on the top of the page, and use a Response.Flush after each 8th iteration.

Other than this, I am out of ideas. Maybe it has to with proxy or caching servers in between. Then again, maybe not ;)

BTW, if you see odd access attempts on your server, I tried to find out which HTTP version your site was using. No hacking attempts ;)

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Wait" function in VBA wscheiman Access VBA 15 December 18th, 2010 05:16 PM
wait for seconds pzmrcd C# 1 August 1st, 2007 02:06 PM
Wait In VB ashes0000 Beginning VB 6 5 February 6th, 2007 11:47 AM
Should I wait for .net 2 androoo ADO.NET 2 November 3rd, 2004 09:07 AM
help me! wait online EdmondWang All Other Wrox Books 1 December 18th, 2003 06:16 AM



All times are GMT -4. The time now is 08:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.